## Evaluation Function That measure is called the [**evaluation function**][1]. Each bot can have a different evaluation function depending on how you want it to behave. Will it favour dynamic play or will it play positionally and emphasize pawn structure? If your bot uses a **classical evaluation** function, these features can be weighted/tuned according to your needs. Here are some examples of features commonly used in classical evaluation functions: - Material - Pawn Structure - Evaluation of Pieces (e.g. good vs bad minor piece) - Mobility - Center Control - King Safety - Space For example, if you want to create a bot that plays aggressively, you might try to make it value material and pawn structure less and mobility and king safety more. You can visit the [Chessprogramming Wiki][1] to see more examples and how such features could be measured and implemented. You can also come up with own features such as ["trappiness"][2], be creative! If you want it to make hyper-aggressive pawn thrusts, you could for example reward moves like g4 in the early game phase. I suggest you use Stockfish, for anything not related to the evaluation (a chess engine also needs a search) and use your own evaluation function, which should be pretty easy to do. This has already been done, [see the SimpleEval bot][3]. Your evaluation function does not even need to be extremely complex to reach acceptable playing strength, as you can see in that extreme example. Here is the bot's [source code][4]. You can also try to use a **neural network evaluation** function. There is [research][5] on how to make neural network evals play "human moves" rather than "computer moves", the result being the [Maia-bots][6]. You can try a similar approach to what they write in the paper, but instead of learning on random games learn on games of specific players (e.g. attacking players). This is easier said than done, however, as your training set will probably be extremely small compared to what Maia had to train. Here are some ideas on how you might make it work: - learn on self-play or human games, but weigh the games of the players you want to mimic much more heavily - try transfer learning - do some original research That being said, I think that it should be easiest to use a classical evaluation as it is much easier and cheaper to test and tweak. ## Opening book In order to help the bot to behave the way you intend, it is very advisable to give it an opening repertoire that suits its intended play-style. This is done on chess.com to create bots of famous players. If you prescribe your bot to play the sharpest variations of the Sicilian, it will be forced to play aggressively. This will be a head start for your bot and I expect the opening book to make your task much easier. [1]: https://www.chessprogramming.org/Evaluation [2]: https://lichess.org/@/Boris-Trapsky [3]: https://lichess.org/@/simpleEval [4]: https://github.com/ddugovic/Stockfish/tree/simpleEval [5]: https://arxiv.org/abs/2006.01855 [6]: https://lichess.org/@/maia9