alpha-beta-pruning

Chess: high branching factor

旧时模样 提交于 2019-12-02 16:01:26
I'm trying to develop a simple chess engine, but I'm struggling with its performance. I've implemented Negamax with alpha-beta pruning and iterative deepening (without any additional heuristics), but I'm unable to get reasonable search time beyond 3-4th ply. Here is an excerpt from my program's log from the beginning of the game: 2013-05-11 18:22:06,835 [9] INFO CoevolutionaryChess.Engine.MoveSearchers.NegamaxMoveSearcher [(null)] - Searching at depth 1 2013-05-11 18:22:06,835 [9] DEBUG CoevolutionaryChess.Engine.MoveSearchers.NegamaxMoveSearcher [(null)] - Leaves searched: 28 2013-05-11 18:22

Conversion of minimax with alpha beta pruning to negamax

﹥>﹥吖頭↗ 提交于 2019-11-30 15:15:23
I've written a minimax algorithm with alpha beta pruning for the game Checkers, and now I'm trying to rewrite it using the negamax approach. I'm expecting the two to be equivalent, since negamax is just a technique to write the minimax. But for some reason my two algorithms behave differently. When I run them both on the same input, the negamax version seems to evaluate more states, so I think something must be wrong with the alpha beta pruning. The code below shows both algorithms ( minimax and negamax functions), and at the bottom the play function from which I call them. The evaluate

Alpha-beta pruning for Minimax

只谈情不闲聊 提交于 2019-11-30 13:53:24
问题 I have spent a whole day trying to implement minimax without really understanding it. Now, , I think I understand how minimax works, but not alpha-beta pruning. This is my understanding of minimax: Generate a list of all possible moves, up until the depth limit. Evaluate how favorable a game field is for every node on the bottom. For every node, (starting from the bottom), the score of that node is the highest score of it's children if the layer is max. If the layer is min, the score of that

Alpha-beta pruning for Minimax

可紊 提交于 2019-11-30 08:47:29
I have spent a whole day trying to implement minimax without really understanding it. Now, , I think I understand how minimax works, but not alpha-beta pruning. This is my understanding of minimax: Generate a list of all possible moves, up until the depth limit. Evaluate how favorable a game field is for every node on the bottom. For every node, (starting from the bottom), the score of that node is the highest score of it's children if the layer is max. If the layer is min, the score of that node is the lowest score of it's children. Perform the move that has the highest score if you are

How to create a good evaluation function for a game?

萝らか妹 提交于 2019-11-29 21:48:06
I write programs to play board game variants sometimes. The basic strategy is standard alpha-beta pruning or similar searches, sometimes augmented by the usual approaches to endgames or openings. I've mostly played around with chess variants, so when it comes time to pick my evaluation function, I use a basic chess evaluation function. However, now I am writing a program to play a completely new board game. How do I choose a good or even decent evaluation function? The main challenges are that the same pieces are always on the board, so a usual material function won't change based on position,

How to create a good evaluation function for a game?

独自空忆成欢 提交于 2019-11-28 17:36:55
问题 I write programs to play board game variants sometimes. The basic strategy is standard alpha-beta pruning or similar searches, sometimes augmented by the usual approaches to endgames or openings. I've mostly played around with chess variants, so when it comes time to pick my evaluation function, I use a basic chess evaluation function. However, now I am writing a program to play a completely new board game. How do I choose a good or even decent evaluation function? The main challenges are