MCPcopy Create free account
hub / github.com/PascalPons/connect4 / negamax

Method negamax

Solver.cpp:39–105  ·  view source on GitHub ↗

* Reccursively score connect 4 position using negamax variant of alpha-beta algorithm. * @param: position to evaluate, this function assumes nobody already won and * current player cannot win next move. This has to be checked before * @param: alpha < beta, a score window within which we are evaluating the position. * * @return the exact score, an upper or lower bound score depending o

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 10

canWinNextMethod · 0.80
nbMovesMethod · 0.80
keyMethod · 0.80
addMethod · 0.80
moveScoreMethod · 0.80
getNextMethod · 0.80
playMethod · 0.80
putMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected