cl-ggp includes a simple Prolog-based reasoner you can use as a starting point when writing general game players in the
This package contains a simple GGP reasoner. It can be useful as a starting point for writing general game players.
(GOAL-VALUE-FOR REASONER STATE ROLE)
Return the goal value for
nil if none exists.
Note that the GDL spec only requires that such values have meaning in terminal states. Game authors sometimes add goal values to nonterminal states, but this is probably not something you should rely on.
Return the initial state of
(LEGAL-MOVES-FOR REASONER STATE ROLE)
Return a list of legal moves for
ggp:player-select-move must return exactly one of the items in this list.
Create and return a reasoner for the given GDL
rules should be a list of GDL rules with the symbols interned into the
ggp:player-start-game will give you this, or you can
ggp:read-gdl-from-file to get them without a player if you want to just
poke at the reasoner.
(NEXT-STATE REASONER STATE MOVES)
Compute and return the successor to
moves were made.
moves should be an alist of
(role . move) pairs, which is what
ggp:player-update-game will give you.
(TERMINALP REASONER STATE)
state is terminal.