Tic Tac Toe
If the coding below the "###" marker looks jumbled, make sure
you've turned wordwrap OFF in your text editor. The lines are
very long, but still easier to follow unwrapped.
To install this module, make the necessary adjustments to each
line (as detailed below), and paste everything below the "###"
marker into the appropriate alphabetic point in an exported
copy of your bot. Then import the bot, and hey presto!
********************************************************
* NB: ALWAYS, ALWAYS, ALWAYS KEEP AN UNALTERED COPY OF *
* YOUR EXPORTED BOT FILE AS A BACKUP!!! I disclaim all *
* responsibility if you write off your bot and haven't *
* got a backup to restore from. You have been warned! *
********************************************************
The code consists of a single keyphrase line (first line), and
an exhaustive set of seeks to cover all eventualities. The bot
will play aggressively to win, and failing that, will force a
draw.
Feel free to use/modify/make any other use you like of this
listing.
If you just paste this in to your bot's mindfile exactly as
it is, you'll get an error message:
ERROR: Too many Responses here are used in other Bots.
In the interest of originality, copying Responses from
one bot to another is not allowed. You can have the same
Keyphrases, but your Responses must be original.
You'll need to add/delete one or more characters to/from each
line to make it an effectively different set of Responses.
Pop an extra character onto the end, or delete the last period
on the third line of each screen. Whatever. I'm sure you'll
figure it out quicker than it took me to code it using the web
interface ;)
Keyphrases don't need changing (unless you want to of course.)
NB: Installing this module will cost your bot ~45 development
points, since there are so many single-response keyphrases.
###
noughts and crosses, tic tac toe, tic-tac-toe, tictactoe [50,0]
OK, but I have to start. Father Peter hasn't finished the other half of the script yet.
And you'll have to use capital letters - there seems to be a slight problem with lower case raw mode.
+ xnomatch [0]
..........A......B......C..
.....1......................... - please enter your
.....2............x........... - move as a coordinate
.....3......................... - eg: A1, B3, C2
+ A1, 1A, a1, 1a [0]
..........A......B......C..
.....1....o................... - you went A1
.....2............x........... - I go C3
.....3....................x..
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1....o......o.......x.. - you went B1
.....2............x........... - I go C1
.....3....................x..
+ A3, 3A, a3, 3a [0]
..........A......B......C..
.....1....o......o.......x.. - you went A3
.....2............x.......x.. - I Win!
.....3....o..............x..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1....o......o.......x.. - you went C2
.....2............x.......o.. - I Win!
.....3....x..............x..
+ A2, 2A, a2, 2a [0]
..........A......B......C..
.....1....o......o.......x.. - you went A2
.....2....o......x.......x.. - I Win!
.....3....................x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....o......o.......x.. - you went B3
.....2............x.......x.. - I Win!
.....3............o......x..
+ C1, 1C, c1, 1c [0]
..........A......B......C..
.....1....o......x.......o.. - you went C1
.....2............x........... - I go B1
.....3....................x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....o......x.......o.. - you went B3
.....2....x......x........... - I go A2
.....3...........o.......x..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1....o......x.......o.. - you went C2
.....2....x......x.......o.. - It's a Draw!
.....3....x.....o.......x..
+ A3, 3A, a3, 3a [0]
..........A......B......C..
.....1....o......x.......o.. - you went A3
.....2....x......x.......x.. - I Win!
.....3....o.....o.......x..
+ A2, 2A, a2, 2a [0]
..........A......B......C..
.....1....o......x.......o.. - you went A2
.....2....o......x........... - I Win!
.....3............x......x..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1....o......x.......o.. - you went C2
.....2............x.......o.. - I Win!
.....3...........x.......x..
+ A3, 3A, a3, 3a [0]
..........A......B......C..
.....1....o......x.......o.. - you went A3
.....2............x........... - I Win!
.....3....o.....x.......x..
+ A2, 2A, 2a, a2 [0]
..........A......B......C..
.....1....o................... - you went A2
.....2....o......x........... - I go A3
.....3....x..............x..
+ C1, 1C, c1, 1c [0]
..........A......B......C..
.....1....o...............o.. - you went C1
.....2....o......x........... - I Win!
.....3....x......x......x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....o...............x.. - you went B3
.....2....o......x........... - I Win!
.....3....x......o......x..
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1....o......o.......x.. - you went B1
.....2....o......x........... - I Win!
.....3....x..............x..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1....o...............x.. - you went C2
.....2....o......x.......o.. - I Win!
.....3....x..............x..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1....o................... - you went C2
.....2............x.......o.. - I go A3
.....3....x..............x..
+ C1, 1C, c1, 1c [0]
..........A......B......C..
.....1....o...............o.. - you went C1
.....2............x.......o.. - I Win!
.....3....x......x......x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....o...............x.. - you went B3
.....2............x.......o.. - I Win!
.....3....x......o......x..
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1....o......o......x.. - you went B3
.....2............x.......o.. - I Win!
.....3....x..............x..
+ A2, 2A, 2a, a2 [0]
..........A......B......C..
.....1....o................... - you went A2
.....2....o......x.......o.. - I Win!
.....3....x......x......x..
+ A3, 3A, a3, 3a [0]
..........A......B......C..
.....1....o................... - you went A3
.....2....x......x........... - I go A2
.....3....o..............x..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1....o.......x.......... - you went C2
.....2....x......x.......o.. - I go B1
.....3....o...............x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....o.......x......x.. - you went B3
.....2....x......x.......o.. - It's a Draw!
.....3....o.......o......x..
+ C1, 1C, c1, 1c [0]
..........A......B......C..
.....1....o......x.......o.. - you went C1
.....2....x......x.......o.. - I Win!
.....3....o......x.......x..
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1....o.......o.......... - you went B1
.....2....x......x.......x.. - I Win!
.....3....o..............x..
+ C1, 1C, c1, 1c [0]
..........A......B......C..
.....1....o...............o.. - you went C1
.....2....x......x.......x .. - I Win!
.....3....o..............x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....o................... - you went B3
.....2....x......x.......x.. - I Win!
.....3....o.....o.......x..
+ C1, 1C, c1, 1c [0]
..........A......B......C..
.....1....o...............o.. - you went C1
.....2....x......x.......x.. - I Win!
.....3....................x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....o...............x.. - you went B3
.....2............x........... - I go C1
.....3...........o.......x..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1....o...............x.. - you went C2
.....2............x.......o.. - I Win!
.....3....x.....o.......x..
+ A3, 3A, a3, 3a [0]
..........A......B......C..
.....1....o...............x.. - you went A3
.....2............x.......x.. - I Win!
.....3....x......o.......x..
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1....o......o.......x.. - you went B1
.....2............x.......x.. - I Win!
.....3...........o.......x..
+ A2, 2A, a2, 2a [0]
..........A......B......C..
.....1....o...............x.. - you went A2
.....2....o......x........... - I Win!
.....3....x.....o.......x..
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1............o........... - you went B1
.....2............x........... - I go A3
.....3....x...................
+ C1, 1C, c1, 1c [0]
..........A......B......C..
.....1....x......o.......o.. - you went C1
.....2............x........... - I went A1
.....3....x...................
+ A2, 2A, a2, 2a [0]
..........A......B......C..
.....1....x......o.......o.. - you went A2
.....2....o......x........... - I Win!
.....3....x...............x..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1....x......o.......o.. - you went C2
.....2............x.......o.. - I Win!
.....3....x...............x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....x......o.......o.. - you went B3
.....2............x........... - I Win!
.....3....x.......o......x..
+ C3, 3C, c3, 3c [0]
..........A......B......C..
.....1....x......o.......o.. - you went C3
.....2....x......x........... - I Win!
.....3....x...............o..
+ A1, 1A, a1, 1a [0]
..........A......B......C..
.....1....o......o.......x.. - you went A1
.....2............x........... - I Win!
.....3....x...................
+ A2, 2A, a2, 2a [0]
..........A......B......C..
.....1....x......o.......x.. - you went A2
.....2....o......x........... - I Win!
.....3....x...................
+ C3, 3C, c3, 3c [0]
..........A......B......C..
.....1............o.......x.. - you went C3
.....2............x........... - I Win!
.....3....x...............o..
+ C2, 2C, c2, 2c [0]
..........A......B......C..
.....1............o.......x.. - you went C2
.....2............x.......o.. - I Win!
.....3....x...................
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1............o.......x.. - you went B3
.....2............x........... - I Win!
.....3....x......o............
+ C1, 1C, c1, 1c [0]
..........A......B......C..
.....1.....................o.. - you went C1
.....2............x.......x.. - I go C2
.....3.........................
+ A2, 2A, a2, 2a [0]
..........A......B......C..
.....1....x...............o.. - you went A2
.....2....o......x.......x.. - I go A1
.....3.........................
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1....x......o.......o.. - you went B1
.....2....o......x.......x.. - I Win!
.....3.....................x..
+ A3, 3A, a3, 3a [0]
..........A......B......C..
.....1....x...............o.. - you went A3
.....2....o......x.......x.. - I Win!
.....3....o................x..
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1....x...............o.. - you went B3
.....2....o......x.......x.. - I Win!
.....3............o.......x..
+ C3, 3C, c3, 3c [0]
..........A......B......C..
.....1....x...............o.. - you went C3
.....2....o......x.......x.. - I go B3
.....3............x.......o..
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1....x......o.......o.. - you went B1
.....2....o......x.......x.. - It's a Draw!
.....3....x......x.......o..
+ A3, 3A, a3, 3a [0]
..........A......B......C..
.....1....x......x.......o.. - you went A3
.....2....o......x.......x.. - I Win!
.....3....o......x.......o..
+ A1, 1A, a1, 1a [0]
..........A......B......C..
.....1....o...............o.. - you went A1
.....2....x......x.......x.. - I Win!
.....3.........................
+ B1, 1B, b1, 1b [0]
..........A......B......C..
.....1............o.......o.. - you went B1
.....2....x.......x.......x.. - I Win!
.....3.........................
+ A3, 3A, a3, 3a [0]
..........A......B......C..
.....1.....................o.. - you went C1
.....2....x.......x.......x.. - I Win!
.....3....o...................
+ B3, 3B, b3, 3b [0]
..........A......B......C..
.....1.....................o.. - you went B3
.....2....x......x.......x.. - I Win!
.....3............o...........
+ C3, 3C, c3, 3c [0]
..........A......B......C..
.....1.....................o.. - you went C3
.....2....x......