Arabian Knight

written by Marcin Gardyjan
mgkiler@wp.pl
marcin.gardyjan@gmail.com
country: Poland
born in: 1983

Textured Pieces and Stone Board by Tomasz Pacyna


Other resources taken from free sources:

Classic Pieces by SpinningSpark
http://commons.wikimedia.org/wiki/Category:Chess_svg_pieces
licence: http://commons.wikimedia.org/wiki/File:Chess_nlg45.svg
         http://creativecommons.org/licenses/by-sa/3.0/
Pieces avalible in classicPieces.zip archive

Chess Alpha 2 Pieces by Eric Bentzen and Peter Strickland.
Avalible as fonts in ChessFontAlpha2.zip archive and free to use (with some restrictions).

Wooden Board by Borysses
http://borysses.deviantart.com



Newest version of this engine could be downloaded from:
http://wbec-ridderkerk.nl/html/details1/ArabianKnight.html
or
http://lpps.maciej.szmit.info/programy.html



Sorry for my english. I am not native english speaker.



This application is freeware.
-It means you may download and share it, but you cannot modify it.
-The code cannot be decompiled and used in other programs.
-Graphic files that are packed in the jar archive but are not available in attached zip files cannot be used.
-You may use it in any tournament. Just inform me :)



Requierments:

Installed Java Virtual Machine.
download for example from: www.java.sun.com
Path to java folder have to be set in your system enviroments.* 

Recomended:
64bit operation system.
Multicore processor (CPU) or multi processor platform with shared memory.

* - If it is not set, you will have to type all the path to your java folder instead of "java" in every command
for example:
"C:/Program Files/Java/jre6/bin/java.exe"
instead of:
java



Runing:

ArabianKnight.jar and ArabianKnight.config have to be in the same folder.
The program has to be started from this folder.
You don't need to unpack the jar archive to run the program!
You need Java virtual machine as I sad in requierments.

Just double click (or press enter) on jar file.
If it does't work try run bat or sh file (or associate jar extension file with Java Virtual Machine)
Or type command:
java -jar ArabianKnight.jar
you can add "textmode" parameter if you want to play in console. For example:
java -jar ArabianKnight.jar textmode

WARNING!: Path where you put ArabianKnight can not contain ! or ; characters.
Example: "C:\test!\ArabianKnight" is wrong name for folder. My engine will not start because folder test! contains character !.



Running with XBoard/WinBoard (First Method):

add to xboard/winboard ini file in section /firstChessProgramNames entry:
"java -jar ArabianKnight.jar xboard" /fd=ArabianKnightFolder

and in section /secondChessProgramNames entry:
"java -jar ArabianKnight.jar xboard" /sd=ArabianKnightFolder

Where ArabianKnightFolder is your path to ArabianKnight.

For example:
"java -jar ArabianKnight.jar xboard" /fd=D:/ChessEngines/ArabianKnight



Running with XBoard/WinBoard (Second Method):

Run WinBoard with command:
"WinBoardPath/winboard.exe" /fd=ArabianKnightFolder /fcp='java -jar ArabianKnight.jar xboard' /sd=ArabianKnightFolder /scp='java -jar ArabianKnight.jar xboard'

for example:
"D:/WinBoard/winboard.exe" /fd='D:/ChessEngines/ArabianKnight' /fcp='java -jar ArabianKnight.jar xboard' /sd='D:/ChessEngines/ArabianKnight' /scp='java -jar ArabianKnight.jar xboard'

You may create a shortcut bath file (bat in windows, sh in Linux) with this command.



Running with Arena:

You have to create in Arabian Knight folder a "bat" file (eg: ArabianKnightArena.bat). And inside that file type something like this:

"C:/Program Files/Java/jre6/bin/java.exe" -jar ArabianKnight.jar xboard

Of course the path to Java depends on your system and your instalation of Java.

Then in Arena (Details\General\Command Line field) you simply add Arabian Knight like any other engine instead you don't show "exe" file but "bat" file (change "files of type" from "exe" to "bat" if Arena don't see bat file or just type a path to this "bat" file).



Running in console mode (no GUI):

java -jar ArabianKnight.jar textmode



Cores and number of processors configuration:

For tournament purposes sometimes you want to set how many processors engine can use.
In config file you may set it changine value: ProcessorsCount.
This is number of logic processors.
For example if you have 2 CPU's each has 4 cores you have 8 logic processors.
Default value is:

LogicalProcessorsCount = Auto

It could be changed to any number betwen 1 and 256, but you shouldn't set a value greater than the real number of your logic processors



Memory:

You may set amount of memory used for Transposition Tables in config file:

TranspositionTableMemory(MB)

But maximum amount of memory the engine will use is undefined and limited only by JVM (Java Virtual Machine). JVM may not dealocate unused data if there is still memory left. But you may limit total avalible memory by running ArabianKnight with parameter Xmx added to JVM.

For example:

java -jar -Xmx128M ArabianKnight.jar xboard

Will run ArabianKnight in xboard mode and limit it's memory to 128 megabytes.
Don't limit it too much. Usually it should be little more than transposition table memory wich is set in config file.


Commands in text mode:

Most commands are exaclty the same with CECP (Chess Engine Communication Protocol).
But there is few more.

Some commands:

exit
quit
clearboard
setplayer [w/b]
setcastlingflags [number 0..15]
setenpassant [number -1..7. -1 is none. 0 is a, 1 is b, etc...] 
setfield [eg. a1R, b8n, etc]
setboard [FEN]
savegame [filename]
loadgame [filename]
loadboard [number] - loading test board from bench file
createopenbook [filename] - create book from file, but skips some openings
createfullbook [filename] - create book from file
bookproduct [filename] - removes from book openings that are not games from file
debugpath [number] - prints the best game path
tableinfo - info about transposition tables
generatortest [n number] - generates moves n times
treetest [d number] - performance test, generate gametree without cuts with depth d
perftest [d number] - thesame as treetest
epdtest [epdfilename]
newgame
new
takeback
undo
remove
hint
hint full - generate full text hint.
print - prints the board
eval - scores the position
draw
quiescencesearch [on/off]
usebook [on/off]
depth [number]
sd [number] - thesame as depth
level MPS BASE INC - sets time limit
levelmode [depth/time/time&depth]
force - force mode. two players
go
[move]