Distributed chess engine, exploring and evaluating future possible moves to determine the best move to play.
- In a terminal, run the java chess library node:
java -jar game/game.jar <NODE>@<HOSTNAME> <COOKIE>, where<NODE>will be the name of the node,<HOSTNAME>is this machine hostname and<COOKIE>is a secret word used for Erlang communication between nodes. - In
DistributedChessEngine/ia/Open an Erlang terminal:erl -name <HOSTNAME> -setcookie <COOKIE>, where<HOSTNAME>is this machine hostname and with the same<COOKIE>as above. - Compile the file ia.erl:
c(ia)..
Start or resume a given game.
javahostis the hostname of the running java chess library node, format:<NODE>@<HOSTNAME>depthis the number of moves ahead the program will look forfenis a given chess board disposition, in Forsyth–Edwards Notation (FEN). If not provided, the program will start a new game.
- Start erlang in terminal with:
erl -pa Linda-master/src - And make sure that in the
Linda-master/srcfolder for every.erlfiles you also have the corresponding.beam. - Try to call with start position:
"rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1"
Board format: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
Move format: a2a3
Request: {java, <HOSTNAME>} ! {self(), getLegalFens, {<BASEFEN>}}
Response: {senderPid, getLegalFens, {[<RESULTFENSLIST>]}
Error: {senderPid, error, {<ERRORMESSAGE>}}
Request: {java, <HOSTNAME>} ! {self(), getLegalMoves, {<BASEFEN>}}
Response: {senderPid, getLegalMoves, {[<RESULTMOVESLIST>]}
Error: {senderPid, error, {<ERRORMESSAGE>}}
Request: {java, <HOSTNAME>} ! {self(), extend, {_,_,_,<BASEFEN>,_}}
Response: {senderPid, extended, {[_,_,_,<BASEFEN>,_,[{<RESULTMOVES>,<RESULTFENS>}]]}
Error: {senderPid, error, {<ERRORMESSAGE>}}
Request: {java, <HOSTNAME>} ! {self(), whiteMove, {<BASEFEN>, <MOVE>}}
Response: {senderPid, whiteMove, {[<RESULTFEN>]}
Error: {senderPid, error, {<ERRORMESSAGE>}}
Request: {java, <HOSTNAME>} ! {self(), blackMove, {<BASEFEN>, <MOVE>}}
Response: {senderPid, blackMove, {[<RESULTFEN>]}
Error: {senderPid, error, {<ERRORMESSAGE>}}