Read-only archive of the Armageddon Games Forums Archive (2000–2026) · About this archive

Undefeated Toe

16 replies · 7,733 views · Started 29 May 2014

This is non-beatable Tic-Tac-Toe A.I. at it's annoyingly useless best.

I'm starting on writing it now, I'll be done in a few minutes to an hour probably.

Edit: Due to slight rustyness with ZScript and an uncooperative ZC build this is going to take a few more hours.

Heh. Will you add in the ability to specify any arbitrary sized board as well? Also just curious, but how are you doing the AI? I'd imagine it would check for moves based on priority? ie;
-check win move
-check block move
-check move that creates the greatest threat
-check centers(s)

Yes, I will add in a board variation scripting later... That made me think of other things like methods of using other things on screen to play the game with like lighting torches or pushing magic prisms or something. The comp is done, it always wins or cattail draw, never fails...
In fact, there is no win counter at all, only a loss counter. Press R to reset the board.

The auto-scaling board is almost done, just need to figure out what to do about the drawing the X's and Os.. Probably use draw functions for that too instead of tiling, it looks nice so far.

I'll have it posted tomorrow, it's dinner time and I gotta go.

Okay, okay, the randomness of the AI's move on that one makes that possible. I had a feeling that that was going to happen yesterday when I finished it's script, and didn't take time to fully beta test it.
This one that's already posted will have to be reduced to 1/3 chance of possibly winning with the right strategy but otherwise non-defeatable tic-tac-toe.

I'm going to fix that and make an actually non-beatable version.
This one is really good for a rupee or item racking guy or something since it's slight possibility that someone can win.

GrantGreif wrote:Top, left, middle, bottom

Alright, one more edit to the script then I'm done for the day.
nm the hacking thing, I overlooked something again.
You're good at tictactoe dude!

GrantGreif wrote:This version still has the bug where the computer sometimes doesn't move.

Odd... That still hasn't happened to me.. Are you sure it's not the coloring?
Could you post a pattern that this happens with?
I've tried everything I could think of and the computer makes a move every time.