-
Notifications
You must be signed in to change notification settings - Fork 18
As of v0.3, ChessCraft includes support for AI (Computer) chess players. This is using the GPL'd jChecs AI engine.
The simplest way to do this is to create a game and start it without inviting a human opponent. If you do this, a random AI will automatically be chosen for you. This AI opponent could be very weak, or very challenging (for a casual player - none of the built-in AI's should seriously challenge a strong player).
To see what AI's are available:
/chess list ai
By default, there are 17 possibilities using a combination of search engines and search depths. In general, the higher the search depth, the more dangerous the opponent. The engines supported are:
- AlphaBeta (depths 3-6)
- MiniMax (depths 1-4)
- MiniMax++ (depths 2-5)
- NegaScout (depths 3-6)
- Random (depth 1)
(Random is really dumb)
To invite a specific AI, you can use the /chess invite
command, just as if you were inviting a human opponent:
/chess invite ai01
And then start the game as normal.
###Customising the AI definitions
You can edit the file AI_settings.yml in the plugins/ChessCraft folder. The file is well commented, and the layout should be pretty clear.
- You can define user-friendly aliases for an engine definition by changing the "funName" field. This can be a list of names, separated by commas.
- You can enable or disable particular engine definitions by changing the "enabled" field
- You can add comments that will be shown to users when they run
/chess list ai
in the "comment" field - You can adjust the payout for beating an AI (only applies if Economy support is active) in the "payout_multiplier" field. This is a floating-point number which multiples the payout given to winning players (default 1.0)
Once you've finished editing this file, use /chess reload ai
to reload it (or reload/restart the server).