AuthorTopic: Are there any "rules" which can help someone win? (Read 6497 times)

28

There is a game where you and your opponent take turns in drawing matches(or rocks or cards or something like that, in this story I'll just use matches). There is a finite and known number of matches and every time when it is your turn you may draw 1, 2, or 3 matches. The one who draws the last match wins.

A long time ago I made a program which plays this game. And making the AI was pretty simple, and the AI was not random at all. Because there is a rule which, if you follow it, makes you win. That rule is this: After your pick, the number of matches must be dividable by 4. If you do that every time, then your opponent will 100% sure lose. Many people don't know this and always lose against my program(Well maybe not always but they had a very small chance of winning if they did not know about this trick). =p

Anyway, my question is: when someone makes a RPS playing program, would the program be better if he followed certain rules, like my program did? Or would the program be best if he tossed randomly every time? What do you think?

(BTW Apologies for my bad english. English is not my native langue. I hope my bad english doesn't piss you off too much )

However playing randomly doesn't necessarily work either as if you could play perfectly randomly you would win 1/3 of the time, lose 1/3 of the time, and draw 1/3 of the time - reducing the game to essentially a coin toss.

Most people who program serious RPS playing AI's (and there's a long tradition, the University of Alberta held a long-standing artificial intelligence contest using RPS AI programs) write the programs to try and detect patterns in their opponents play (or fake patterns in their own play to try and sucker opponents). But this involves having many different strategies to choose from (and knowing when to change them up).

In this way, programming a computer to play RPS is very similar being a professional RPS player yourself, and requires a very detailed knowledge of the game.

« Last Edit: February 18, 2010, 02:14:52 PM by Brad Fox »

Logged

Head of Officiating WRPSHead Referee, World Championships 2004-2008Grand Marshall, World Championships 2009