HackerTrans
トップ新着トレンドコメント過去質問紹介求人

Entze

no profile record

コメント

Entze
·昨年·議論
ASP is optimized for combinatorial problems. Basically, you list the parts that are variable, and the constraints, the answers are given by the solver. Have a look at the documentation[0]. Here is an example:

    % Each shift needs a nurse).
    1 { shift_nurse(Shift, Nurse): nurse(Nurse) } 1 :- shift(shift).

    % It cannot be that a nurse does two shifts in a row.
    :- nurse(Nurse), shift_nurse(Shift1,Nurse),shift_nurse(Shift2,Nurse), Shift1 + 1 = Shift2.

[0] https://potassco.org/doc/start/
Entze
·昨年·議論
You could have a look at the potassco suite[0]. It is a grounder and solver for Answer Set Programming (ASP). ASP is a form of Logic Programming.

[0] https://potassco.org/
Entze
·3 年前·議論
It is research code (read very unpolished) but you can get inspiration from pyggp [1]. More specifically, the game_description_language module. I implemented pyggp for my masters thesis. It's a proof of concept and will be iterated upon.

[1] github.com/Entze/pyggp