News for hackers. Stuff that matters.
Re:Play against the computer – Connect Four game in JavaScript by drewnoakes on Friday October 21, 2022 @06:04PM (#33293487)
I've found that the only way to win is to go first, just like in tic tac toe. Going second can produce a draw at best, against an optimal opponent. This is just my experience though, not a strong assertion.
Re:Play against the computer – Connect Four game in JavaScript by pebcakID10T on Friday October 21, 2022 @06:11PM (#33293540)
With perfect play the first player will always win. My AI is not perfect and you can win as the second player.
Re:Play against the computer – Connect Four game in JavaScript by xerofuzzion on Saturday October 22, 2022 @01:20AM (#33295834)
This is not true, I've played twice as the second player and won both. The seem to likes setting up 3 diagonal, during that you are free to setup your own lower trap with two intersecting diagonals. So far doing that always seems to win.