Questions tagged [negamax]

Variant form of minimax search that relies on the zero-sum property of a two-player game. The objective is to find the best move for the player that's playing at the root node.

62 questions
1
vote
0 answers

Connect Four - Negamax AI evaluation function issue

I'm trying to implement NegaMax ai for Connect 4. The algorithm works well some of the time, and the ai can win. However, sometimes it completely fails to block opponent 3 in a rows, or doesn't take a winning shot when it has three in a row. The…
1
vote
2 answers

Negamax negation

Sorry if this is a silly question but I am confused. Negamax at the very beginning checks whether an end state or a maximum depth has been reached. You then insert a evaluation function which returns a negative or positive score for the state (one…
0
votes
0 answers

Alpha Beta Pruning causes negamax to choose poor moves

I am setting up a basic chess AI using negamax and alpha beta pruning. If I remove alpha beta pruning, then it works as expected. After adding in pruning, it plays worse moves (but much faster). Sometimes it plays as expected until it abruptly…
0
votes
0 answers

How to add transposition table to Negamax?

I've recently been improving my Negamax algorithm for chess, adding a transposition table. The algorithm was working well before this addition. After this addition I can't see no big improvements in speed, and sometimes I even see some regressions.…
SKAE
  • 83
  • 1
  • 10
0
votes
0 answers

Sequential game but cannot apply Minimax

I am trying to create a 2-player Atlas game bot along the lines of chess bots by using the Minimax algorithm. I am using a database of just countries and capitals to induce strategy in the game. There are 2 ways the game could end : The player…
0
votes
0 answers

How to test implementation of alpha beta pruning?

I'm working on a chess engine and have implemented Negamax with alpha beta pruning. I have noticed that fewer nodes are being searched (depth 5 in the starting position goes from 4,865,609 to 701,028 nodes searched), but I am not sure if it is…
Gwoodz
  • 23
  • 4
0
votes
0 answers

Can someone spot the issue with my negamax search?

I am working on a chess engine and believe an aspect of my implementation of Negamax with alpha beta pruning is incorrect. After implementing Negamax, I noticed that the performance of my search was significantly slower than other aspects of my…
Gwoodz
  • 23
  • 4
0
votes
0 answers

Optimizing Negamax Function with 5x5 Hexapawn

I need to improve the speed of this program, because at the moment it is pretty slow. I know that representing game states in binary can be very effective, however, I don't know how to do that. I have also tried using numba, however that seems to…
0
votes
1 answer

What is wrong with my transition table in my negamax implementation?

I'm writing a Chess AI in TypeScript which uses negamax with alpha beta pruning to search through possible moves. It uses two heuristics: 1) the main heuristic, which evaluates leaf nodes in the negamax tree traversal, and 2) a simple inexpensive…
byte-this
  • 204
  • 1
  • 2
0
votes
1 answer

How to deal with draws by repetition in a transposition table?

I'm trying to solve Three Men's Morris. The details of the game don't matter, that that it's a game similar to tic tac toe, but players may be able to force a win from some positions, or be able to force the game to repeat forever by playing the…
0
votes
1 answer

Negamax: implement a quiescent search and evaluate silent moves for the connect four game?

I'm trying to implement a quiescence search in the negamax algorithm, for a connect four game. The algorithm is as follow for a chess game: int Quiesce( int alpha, int beta ) { int stand_pat = Evaluate(); if( stand_pat >= beta ) …
Carmellose
  • 4,815
  • 10
  • 38
  • 56
0
votes
1 answer

How to solve a game with repeating positions (Teeko)

I have been trying to find a algorithm to strongly solve the game Teeko. The game is played on a 5x5 board were each player has 4 pieces and attempts align them in any direction or create a square out of them. (assume there is no drop phase) I have…
0
votes
1 answer

Chess engine beta cutoff making engine less threatening?

I'm quite new to chess programming and have ran into a problem with the search. At the moment, my engine has a simple, "standard" negamax search with a basic evaluation function (pure material counts, non-positional). But the outcome is that given…
Mark G
  • 85
  • 1
  • 5
0
votes
1 answer

Negamax Not Working For Python Chess Engine

I'm making a very simple Python chess engine using the standard Python chess library with a very simple evaluation function; the sum of the total black piece weights (positive) plus the sum of the total white piece weights (negative). The engine…
Anonymous
  • 1
  • 1
0
votes
1 answer

Is there a problem with my Negamax implementation?

I'm trying to write a simple negamax algorithm in Rust for my Chess engine. I have a very simple evaluation function: pub fn evaluate(&self) -> i32 { let mut eval: i32 = 0; for piece_type in PType::PIECE_TYPES { eval += ( …
BenTechy66
  • 102
  • 1
  • 9