Tuesday, 23 November 2010

How to beat a Thai bar-lady at Connect 4

Edited photo thanks to Simon
Few foreigners are able to win from Thai bar-ladies playing Connect 4, especially when being challenged to play for a drink.
If you're being challenged for a drink it usually means the lady played it at least over a 1000 times and will be easily able to beat any above-average player.
Basically Connect 4 is a simple game with 7.1x10^13 possible outcomes. Far less complicated then Chess, Checkers or the Chinese game Go. Also the're few official competitions for this game because it's a "Who begins, wins" game. Meaning if you start and play a perfect game, you will always win, no challenges there for the pro's. The best way to learn the game is to try and exercise against a computer. So far the best program I found is Velena, made by Giuliano Bertoletti in 1997. As far as I know, Velena was the first program able to play a perfect Connect 4 game, evaluating all possible moves until the end and choose the best one. Other perfect player programs are TitOT and Mustrum (For non-Germans, select the tab Einstellungen -> Sprache to change to English or some other languages).
Velena has an opening book of 60,000 moves to save processing time and then continues with brute force.
For software fanatics, the source code in C is available as well.

Classic opening for a perfect game
Yellow will win. Pretty boring like this
Provided you start, winning against the computer at the highest level  is relatively easy, since Velena will always do the same moves from the opening book. Besides there's a button to hint your next move, so after a dozen times you will know your contra-moves, but take care, do any other move and  you're out.
If you really want to learn the game as a beginner you better start at low or normal level.
Remember you have to play it many times and try the other two programs as well. Mustrum seems to be more unpredictible and human but at highest level still defeats you every time if you didn't start and didn't play perfect. In the mean time exercise with live people, but never for a drink, unless you can call yourself an expert. (Not in drinking of course..)

Now my eight basic rules of Connect 4:
1. Always start building up from the middle, here you have the most chances to win.
2. Never fall into this easy trap: If your opponent began and puts a second stone of the same color at the bottom always put you stone at one side, preferably the side which allows you to still be able to get four in a row later.
3. Unless your opponent is tired or as you want to a surprise your opponent, never put three stones in a row where the other is able to directly defend unless you want to force her/(him), since you found a strategic move which you would like to built up. In all other cases your original position and stone will be lost.
4. First always look at your defense, now matter how favourable move you can make. Prevent your opponent from having three in a row, unless she/(he) will not be never to make four (eg. in the corners) or if it's just on top of your trap of three in a row since in this case you will always be able to win if you come there first or defend if you come there as second. Only if your opponent did a irrelevant move where she/(he) can never get four in a row in all four directions, except vertically, which you always can block, or in case you're not able to defend, open your attack and take care to put your stone where ever you will be able to have three in a row and later four of course.
5. Try building traps; three in a row without a gap and empty positions on either side is more favourable than three in a row with a gap, since you will have two chances on both sides.
6. Creating triangles of three stones with free positions aside is good for you.
7. Once mastering the game; know when to stop since alcohol and fatigue affect your ability to play.
8. Tricks in the trade of experienced players are using high speed with a certain nonchalance, which will make you feel to do the same, for beginners always take your time however. Once you might be able to do the opposite. Another trick is to (secretly) check how well someone plays against another and after a few games challenge the winner to play against you.

2 comments:

  1. Good tips I-Nomad. I develop attention deficit disorder when I'm playing connect 4 :-)

    ReplyDelete
  2. Hi Paul, then no free drinks for you, but that wouldn't bother you :-)

    ReplyDelete

ShareThis

Related Posts Plugin for WordPress, Blogger...