![]() Followed by pursuit of positional goals when material gain is impossible (control the centre, seek scope for the pieces etc.). It makes more sense to first make sure your engine can win material with a simple knight fork say, and build from there to multi move material winning combinations. And you can't progress gently to the goal starting with simple 2 or 3 ply calculations because mate is the only point of the calculation here, normal material and positional factors are irrelevant. Brute force minimax plus alpha beta will struggle to do that in a reasonable amount of time without sophisticated pruning. Winning this endgame from an arbitrary start position requires something like 25 moves / 50 ply. I am skeptical about the idea of starting with king, bishop and knight versus king. ![]() memoization can bring insane speed gains. Colin Wrights' law: 'You can't make computers faster, you can only make them do less work' clearly applies here. ![]() It is much better to not generate 'bad' moves than it is to prune them away after a lot of extra work has been done. Optimization of engine code is much harder than optimization of the yield function. This turns all legal moves for all pieces into a simple offset rather than a two dimensional affair. Even a knight won't be able to jump that effectively two field wide edge. On an 8x8 board laid out linearly the edges have no way of limiting piece movement but on a 10x10 you get that for free by putting an 'impossible' value in the unreachable edge fields. A 10x10 board with an unreachable edge has some advantages when laid out as a linear array because it allows for much easier memory management (premature optimizations and all that.). A simpler but much faster engine will beat a more complex engine any time because the advantage of another ply easily outweighs the advantage of some clever algo. Once you can win king, knight, bishop against king reliably you're ready for tougher stuff. Before you start writing a whole chess engine I'd suggest you code up a couple of end-game combinations that are known wins so that you get a good idea of what works and what doesn't for data structures and such.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |