Chess engine speed in python
Hi!
I've written a chess engine in python. For search i'm using a minimax algorithm with alpha beta pruning. My evaluation function is very basic, it just assignes a score to the board based on the piece values still on the board. For board representation i use a mailbox approach, 0x88 board representation in particular.
The problem is though, that my search is very very slow. I haven't implemented any kind of move ordering algorithm yet, but still, it takes over two minutes (sometimes even twice as much) to search with a ply of 4. The average number of moves per position is about 23 and to search 4 ply at the starting position, it only looks at about 20 000 nodes.
20 000 nodes in 2-4 minutes seems very slow to me. My question is that , is python just too slow for a chess engine, or might there be something wrong with my implementation?
链接地址: http://www.djcxy.com/p/84646.html上一篇: 使用通用象棋界面
下一篇: 国际象棋引擎在python中的速度