minmax algorithm for connect 4
Opened this issue · 2 comments
BreadMoirai commented
It's actually a maxmax algorithm right now since I didn't put any thought into it. There's a strategy pattern in place cuz it's a bot strategy so the algorithm needs to be improved from MinimaxStrategy.java to something better like RealMinMaxStrategy.java
Package is samurai.messages.dynamic.duel.strategy
BreadMoirai commented
BreadMoirai commented
so the minimax algorithm is still a bit wonky but it is more than adequate for the average player. Solved this by assuming that 'b' is always Samurai and adjusting values to doubles, removing rounding errors.