Closed jbirkesteen closed 1 year ago
Two minimax agents gives error in later stages of the game in place piece. Needs to be looked at more
Two minimax agents gives error in later stages of the game in place piece. Needs to be looked at more
The issue was that the initial value of the best_score
did not depend on the loss_reward
specified by the user, leading the player to choose column None
when it couldn't avoid a loss. This was resolved in commit 88952cc.
Currently, the
select_action()
method for players take the board in matrix representation as an argument. This, however, leads to problems when we need to define the TDAgent (and, actually, also the minimax-agent, which currently re-use some code fromconnectFour
to work around this).The following needs to be done:
select_action()
for all playersconnectFour
(e.g., instead of its ownplace_piece()
.select_action()
(for instance inEnv
).remove_piece()
method (from the minimax-agent) inconnectFour
, as both minimax and TD will need this.This change should be fine, since the methods would usually be called from
Env
which has access to both players andconnectFour
.