Page 2 of 3
Posted: Thu Sep 10, 2009 12:26 pm
by ftfish
to the confused ones:
when someone wins, all the succeeding moves should be ignored.
Posted: Fri Sep 11, 2009 6:35 am
by hhanger
Still confused...
Tried many answers, all are wrong...
Posted: Sat Sep 12, 2009 3:15 pm
by bearson
hhanger wrote:Still confused...
Tried many answers, all are wrong...
patpat...
Some hint :p
There are 2 players play this game in turn and only wines or draws count.
Posted: Sun Sep 13, 2009 1:17 am
by murphy
hhanger wrote:Still confused...
Tried many answers, all are wrong...
patpat
Posted: Fri Oct 02, 2009 9:32 pm
by zael
Since one space on the 9 space board is always taken by a 'O', there are 8 spaces to play, starting with 'X' taking the first turn.
Due to there being 8 spaces and each space either being taken by 'X' or 'O', I decided to represent entire games as one byte, with equal numbers of zeroes and ones (because each player takes 4 turns).
Since I don't want to spoil things I'll stop there. But I haven't found the answer with my method. I've tried accounting for reflections and also 'X' taking the center space in a second set of games, but still no dice. So I assume my methodology is flawed. But it looks right to me.
If someone who has solved it could just tell me if I'm wrong, then I'll approach it from a different angle. Otherwise I think I'm right and just have a bug in my approach.
I am bad at basically every aspect of maths :/
Also if this is considered saying too much then by all means delete this post.
Posted: Wed Oct 07, 2009 1:11 pm
by Karian
zael wrote:Due to there being 8 spaces and each space either being taken by 'X' or 'O', I decided to represent entire games as one byte, with equal numbers of zeroes and ones (because each player takes 4 turns).
The fact that every player takes 4 turns is isn't really true. Games can be over before all players have taken 4 turns. Once a player has 3 in a row, the game finishes.
Posted: Mon Nov 02, 2009 10:13 am
by zael
I forgot to mention that I was checking for a win after each turn. Thanks anyway.. it's probably my method that's wrong. It seemed right though
Posted: Sun Nov 15, 2009 11:52 pm
by DaymItzJack
So what is the possibility that if I just make a program to randomly play games (and I count the draws) it'd give me the correct answer? I'm assuming since it's to 8 decimal places it'd take a lot of games to be accurate.
I got a question:
If these are the two boards:
O | O | X
X | X | X
O | X | O
O | O | X
X | X | X
X | O | O
And the person with X's wins at the very beginning, does this count as two games and two games won?
Posted: Mon Nov 16, 2009 11:15 am
by Karian
the second board you are giving can never be a valid end of the game. In this board, X is winning in 2 different ways. the game should have stopped after X has made the winning move.
Posted: Mon Nov 16, 2009 9:58 pm
by DaymItzJack
Karian wrote:the second board you are giving can never be a valid end of the game. In this board, X is winning in 2 different ways. the game should have stopped after X has made the winning move.
I was trying to say that if this occurred:
O | |
X | X | X
O | |
Is that only one win or do I count all the extra moves after as a possible win as well?
Posted: Tue Nov 17, 2009 12:42 am
by CodeX
I would assume not as they aren't really possible moves as the game would have ended and so no more moves are valid
Posted: Wed May 12, 2010 11:11 pm
by Isaev
Does this count as two games won or as one game won?
Posted: Wed May 19, 2010 4:12 pm
by Karian
Isaev wrote:Does this count as two games won or as one game won?
2 games
Posted: Mon Sep 20, 2010 2:34 pm
by vjeetje
I found the solution, but I am still confused whether the solution is actually correct. Plus the description of the challenge made me really confused. I didn't found it necessary to start a solved topic for this challenge.
The first player plays with circles(0) and the opponent plays with crosses(X). The board will have 8 free places which is indicated below.
1 | 2 | 3
4 | 0 | 5
6 | 7 | 8
now if the match is as following: 12345687. The number indicates the place where the X's and 0's are placed. So the first player plays a O at the centre, next the opponent plays a X at location 1, the first plays a 0 at location 2,... after 8 (including the opening move) moves we have the current situation:
X | O | X
O | O | X
O | | X
this means the game is over, the opponent won. But the description states the opponent can't win, because placing the first move at the centre is a sure way to win. In the real world this would of course not happen, because the first player could easily block the 3 X's and make a draw of the situation. Judging from the program I wrote this situation is placed in the category of draws. But I didn't found that to be according to the given task.
Posted: Wed Sep 22, 2010 9:15 am
by Karian
vjeetje wrote:this means the game is over, the opponent won. But the description states the opponent can't win, because placing the first move at the centre is a sure way to win. In the real world this would of course not happen, because the first player could easily block the 3 X's and make a draw of the situation. Judging from the program I wrote this situation is placed in the category of draws. But I didn't found that to be according to the given task.
The description states that if you play intelligently, it is a sure win/draw. It is just an introduction to the problem, an explanation why the first move is in the center.
The problem resolves around random games after this point. Surely, in a random match, the second player still has a chance, so there is no reason to count this as a draw.