Live data from Hacker News

Show HN: C4 – Connect Four, with AI

kenrick95.github.io

21–30 of 35 posts

Re: Show HN: C4 – Connect Four, with AI

#23
post #22

Finally got a win, took me about 10 rounds. Really cool thanks for sharing.

Had a win in the first round but that was pure luck. :-)

Had a win in the first round because I played Connect 4 aggressively against my brother for years when I was a kid!

Re: Show HN: C4 – Connect Four, with AI

#24

I want to note that you can win every time by dropping wherever first, then on your next moves dropping every piece on top of the AI's pieces.

Interesting, this method has lead to the game freezing a couple times. And another time it seemed that the computer just skipped it's turn.

Re: Show HN: C4 – Connect Four, with AI

#25
post #9

I wrote a C version of a connect 4 AI and used emscripten to build a JavaScript / AngularJS version. You can check it out for comparison: http://rmarcus.info/blog/2014/12/23/connect4.html Edit -- Github is here: https://github.com/RyanMarcus/connect4 Looks like my AI beats your AI. ;)

Just beat yours at 5 moves ahead

I've been playing at 8 for a challenge. Can't win yet, but I can draw. I left it at 5 as the default because it works well on tablets. :)

Re: Show HN: C4 – Connect Four, with AI

#26
We did a friendly programming competition at MixRank last year writing AIs for Connect Four.

It's really a great game for playing with AI strategies since it's so simple. You can borrow our game runner and write your own: https://github.com/smilliken/aigames/tree/master/connect-fou...

You can use any language since it just talks over pipes. There's a few bots in there you can play against.

Re: Show HN: C4 – Connect Four, with AI

#28

We did a friendly programming competition at MixRank last year writing AIs for Connect Four. It's really a great game for playing with AI strategies since it's so simple. You can borrow our game runner and write your own: https://github.com/smilliken/aigames/tree/master/connect-fou... You can use any language since it just talks over pipes. There's a few bots in there you can play against.

Also, if you'd like some light reading, Victor Allis proved a winning strategy in 1988: http://www.informatik.uni-trier.de/~fernau/DSL0607/Masterthe.... It's a great read, I recommend it.

Re: Show HN: C4 – Connect Four, with AI

#30
post #27

Not to be a pessimist, but Connect Four is a solved problem: http://en.wikipedia.org/wiki/Connect_Four Wouldn't that mean the best AI should always win if it's first (alternatively, you should always win if you're first)?

I'm aware of the fact that this is a solved problem. When I experimented by making it my AI vs my AI, it did not use the optimal first move. This shows that my AI is not perfect :)
Post reply on HN