Play against the computer – Connect Four game in JavaScript
1–10 of 26 posts
Re: Play against the computer – Connect Four game in JavaScript
#2Just a fun little project I did. It's beatable, but not easy.
Re: Play against the computer – Connect Four game in JavaScript
#3It would be nice to be able to click in any square in the board, instead of just the ones in the bottom.
Re: Play against the computer – Connect Four game in JavaScript
#4It would be nice to be able to click in any square in the board, instead of just the ones in the bottom.
Good idea. Done.
Re: Play against the computer – Connect Four game in JavaScript
#5It would be nice to be able to click in any square in the board, instead of just the ones in the bottom.
Good idea. Done.
I've thought about winning algorithms for this game before. The best I could come up with is roughly "get the highest locations you can while still defending against 3-in-a-row".
Re: Play against the computer – Connect Four game in JavaScript
#6Ran into bug - AI beat me by creating a diagonal with the piece in the top rank and it did not count that as endgame. I was able to keep playing.
Re: Play against the computer – Connect Four game in JavaScript
#7ICYI Connect Four is a solved game, you can read about it here:
https://en.wikipedia.org/wiki/Connect_Four#Mathematical_solu...
Re: Play against the computer – Connect Four game in JavaScript
#8Just a fun little project I did. It's beatable, but not easy.
How good is the AI and how was it made?
Re: Play against the computer – Connect Four game in JavaScript
#9Just a fun little project I did. It's beatable, but not easy.
It seems like going first is a disadvantage, since the AI can just play defensively until you are backed into a corner.
Re: Play against the computer – Connect Four game in JavaScript
#10Thanks for sharing! This sent me down the solvability path. It would be cool to have an ‘expert’ mode that plays the optimal strategy.