Axiom is a universal game engine developed by Greg Schmidt, that was originally based on the Zillions of Games engine. It is a system and language designed for game creation. Unlike ZoG, Axiom supports the ability for game developers to specify the AI and therefore it can be applied to non chess-like games such as territorial and connection games.
http://www.mindsports.nl/index.php/axiom
https://groups.yahoo.com/neo/groups/axiom-system/info
https://www.boardgamegeek.com/files/boardgame/all?username=gschmidt
The basic Axiom system is a DLL plug-in for Zillions, but there is also a game player that can be used instead of Zillions, and is free.
The extension language is a dialect of Forth and the Forth source code is provided. The DLL is programmed in C++ and the game player in C#, for Windows only (Windows Forms), but the source code has not been released.
Here is the source code for Tic-Tac-Toe, Forth version.
(
*****************************************
* Simple Game Example - Tic-Tac-Toe *
* *
* Uses the built-in Axiom search engine *
*****************************************
)
$gameLog OFF
{board
3 3 {grid}
board}
{players
{player} X
{player} O
players}
{turn-order
{turn} X
{turn} O
turn-order}
( Drops )
: DropMan
empty? verify drop add-move
;
{moves ManDrops
{move} DropMan
moves}
{pieces
{piece} man {drops} ManDrops
pieces}
(
**********
* Events *
**********
)
(
OnIsGameOver is always called from the perspective of the
player who is about to make the next move. axiom ensures
that the current $movesList is correct for that player.
)
( Does the opponent occupy these 3 positions? )
: 3-in-a-row? ( pos1 pos2 pos3 -- ? )
enemy-at? SWAP
enemy-at? AND SWAP
enemy-at? AND
;
( Win check - Did the player who just moved win? )
: opponent-win? ( -- ? )
0 1 2 3-in-a-row?
3 4 5 3-in-a-row? OR
6 7 8 3-in-a-row? OR
0 3 6 3-in-a-row? OR
1 4 7 3-in-a-row? OR
2 5 8 3-in-a-row? OR
0 4 8 3-in-a-row? OR
2 4 6 3-in-a-row? OR
;
( Determine if the game is over or not. )
: OnIsGameOver ( -- gameResult )
#UnknownScore
opponent-win?
IF
DROP #LossScore
ELSE
stalemate?
IF
DROP #DrawScore
ENDIF
ENDIF
;