Dec 29, 2006

[Download] #8 - WinBoard compatible and quiescent search

I really should have made this in two separate files, but here you go.

Playing in an interface

The engine is now capable of playing using the winboard protocol. Mediocre only handles the most basic winboard-calls.
  • "new" - Resets the board to the original position and starts a new game. This is done by a simple FEN-string input.

  • "quit" - Exits the program. I did this with System.exit(-1).

  • "setboard" - Sends a FEN-string with a position to setup. Mediocre simply inputs the submitted FEN-string without checking for validity, so be careful.

  • "go" - Tells the engine to move from the current position. Mediocre will find the best move and play it.

  • "usermove" - If the command starts with 'usermove' it will be followed by the move. Mediocre takes the move, plays it on the board and then replies with best move it can find.

WinBoard

You can download the WinBoard client here.

To play with the engine you need to edit the following line so it looks something like this in the winboard.ini:
/firstChessProgramNames={GNUChess.exe
"java Mediocre x" /fd="path to mediocre"
}
WinBoard comes with GNUChess so that will already be there, you can remove it if you want or keep it. New engines are added by making a new line between the curly bracers {}.

The "java Mediocre x" is the command used to start the engine, and /fd is the directory the files are in.

There is also a /secondChessProgramNames, this is used if you want to play engines against each other. You can add Mediocre there as well and let it play against itself.

Arena

I have also added a .bat file in the download, this can be used by WinBoard as well but mainly we need it for use with the Arena software. To install the engine in Arena you go to the 'Engines' menu and select 'New engine', then choose 'winboard' and find the .bat file and you are done.

Any other graphical interface you might use will work in similar ways. The .bat file should be the easiest way to install Mediocre.

Quiescent search

I have added the quiescent search and it is working as intended, I think. :) The quisSort()-method is used for sorting the moves according to MVA/LVV, it is a bit messy but should be quite fast.

Mediocre is now playing some seriously decent chess. The lack of any sort of piece placement evaluation and opening book makes it play very weird though.

I will be tweaking that next.



Edits:
2006-12-29 - Submitted the compiled .class-files as well.

No comments: