Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8017 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

merry xmas to everyone in this fantastic fm forum.

most of us, at some stage, must have played (on grid sheets) the "X" & "O" game, ie whoever could continuously put all 5 X's or 5 O's in a straight line first will win the game. I used to play this so much in High School that it was like an obsession. i thought it could be a very interesting thing to do to turn this into a FM game, i'm sure that it would be possible with brains like Bob and Jason and blah blah blah...etc...

if someone knows what i mean but doesnt think the post is clear enough could they please help explain & perhaps come up with potential problems... remember no pain, no gain, we all oughta make it just a bit more difficult for the masters smile.gif

cheers everyone smile.gif

Posted

I made an unbeatable game of Tic Tac Toe game in Visual Basic in grade 11 programming (several years back). It was unbeatable... I just wish I kept a copy of the source code! I have no idea how I did it now!

Posted

Well... looks like I spoke too soon! I found my old pseudocode (which I did on my Mac of course)...

Off topic: I don't know how anyone could do pseudocode without AppleWorks (Has anyone figured out how to do a simple increase/decrease in list level from the keyboard with Word? With AppleWorks it's simply Command-R or Command-L to set the next line up a level to the right or left of the current one!

The game is unbeatable, so my pseudocode might give you some ideas about how to do this in FM.

The main principle was that it was based upon the idea that the board could be "virually" rotated by setting up the corner buttons and side buttons in two arrays so that 4 checks could be performed in one "loop" around the board. I'm gonna be thinking about FileMakerizing it... but I must warn you, I'm not the "brain" you take me for (I just pretend!)... I'm still very new to many of FileMaker's features.

Posted
smile.gif i think to make this game work in FM, there will be a lot of calculations but the most difficult part is perhaps to make FM recognize which fields are 'visually' on a line in a grid page... any comments, anyone?
Posted

I'm confused. You said 5 X's or 5 O's in a row. The game I remember playing only required 3 in a row. Are you playing 12th dimensional space tic tac toe or something?

There was an article in Martin Gardiner's Mathematical Games column in Scientific American many years ago that explained how to use some matchboxes and coloured beads (no computers at all) to make a learning tic tac toe game. It started out dumb, and after many games it slowly learned how to win (if it had the first move) or draw (if the opponent had the first move) every time. I programed the equivalent into my old Apple 2e computer and put it into a loop to make it play against itself a few thousand times until it had learned all it could. Interesting experience. It was far more interesting watching how a program could learn rather than have one where the unbeatable logic was preprogrammed in.

Posted

I don't know which aticle you are talking about but, in 3x3 or 4x3 grid you can not win no matter who has the first move and for any other grid the oponent who has the first move allways wins.

The same rules should apply (DQMOT) for 5 in row or generally spoken n in row Tic Tac Toe.

Dj

Posted

i guess there're basically 3 versions of this game, one has 9 squares and 3 in a row wins, this is the most popular. the other 2 versions would have as many squares as you could fit in a sheet of paper, and 4 OR 5 in a row will win. i personally like the 5 in a row the most because it's most challenging since the players can come up with a lot of strategies.

i agree with Bob's point. i guess i too would get bored very quickly if i know i cannot win the machine no matter how much i try.

another issue about Filemaking this game is that for every square on a grid page (let's say 25 x 25) there maybe 2 fields one on top another, one for the player to tick on & trigger the calculations, the other field would be a calculated field which is only visible if there's a result. this will result in at least a requirement of 1250 fields. hmmmm, should it be 20 x 20 squares then?

is anyone lost? smile.gif

Posted

3x3 or 4x3 grid you can not win no matter who has the first move

Yes, of course, that's right. If both players make the correct moves it will always end in a draw. Tic Tac Toe has never been a particularly interesting game as far as I'm concerned, and it's been at least 20 years since I read the article that I mentioned, so my memory is a bit hazy. The only really interesting part about it was the learning algorithm. I might actually program it into FM sometime, for something to do.

This topic is 8017 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.