Jump to content

Wanna be "Unbeatable"


enaiman
 Share

Recommended Posts

  • 6 months later...
  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

I have a version if anyone is interested:

http://www.czardas.co.uk/more_applications.html

I don't really know what optimal moves are. If the term refers to lines where there are more chances for the opponent to make a mistake, then optimal moves are not necessarily going to lead to more wins. Such moves often lead to a forced continuation, consequently allowing less room for error and producing a higher chance of a draw. A less brute force approach may yield better results. It would be interesting to test this theory.

Edited by czardas
Link to comment
Share on other sites

  • 2 weeks later...

@Revolter - thanks, I haven't been aware of that (I never got beaten and that's why I didn't notice :x ) I'll fix it soon.

@Manadar - that's nice, somebody had alot of time to put that together. It looks complicated first but it's nice, thanks for sharing the link.

@czardas - Thanks for sharing it too :P Some time ago I've started a new one, with a more "intelligent" algorythm (wannabe "more intelligent") but I didn't have enough time to finish it; maybe I will go back to it sometimes :shifty:

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

  • 2 weeks later...

When do computer have first move? (how to choose that your 'O' and that he is 'X')

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

The way it is atm - you have always the first move. It is an intended behaviour. Being the first to move is a bit of advantage; not too much but still an advantage because you can get the center square. The center square is the best of all 3x3 table because there are 4 lines going through; a corner has 3 and a middle square has 2.

It was my intention to give the player "this advantage" just because my script is supposed to be "unbeatable" and not having the first move is "the worst" that could happen. I hope you see my point here ;)

No biggie to have random first moves or to have it an option; I might do it if that's the desire :)

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

Being the first to move is a bit of advantage

Not realy becose i cant bit him and he cant get any score from me ^^ so i whas wondering to see him take the first turn to show him 1 or 2 things ^^

He (the game) know only 2 wayes to start, position 1,1 or position 2,2, depends of where you put your starting X

If starting X is not on position 2,2 he take it as his first move

If starting X is 2,2 he take all the time 1,1, why dont you try for him to take random positions 1,1-1,3-3,3-3,1 instead to use 1,1 all the time when X starting is 2,2 (it can aditionaly confuse some people :))?

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

Is it possible to make the computer play against itself?

The result will always be a draw, although the version I made has the option to set a lower level and occasionally beats itself. The engine does not always play the same sequence of responces, even on the unveatable setting. See my previous post.
Link to comment
Share on other sites

I was easier for me to make it this way but I agree, I can make it play another corner very easy - it is just a matter of a random between 1-4 and playing accordingly. That I can adjust very easy :)

Thanks for suggestions.

If I let the script to have the first move, it will always be the center (best square) so it won't change the behaviour; it will be exactly the same situation if you would have played anywhere but the center.

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

I was easier for me to make it this way but I agree, I can make it play another corner very easy - it is just a matter of a random between 1-4 and playing accordingly. That I can adjust very easy :)

Thanks for suggestions.

If I let the script to have the first move, it will always be the center (best square) so it won't change the behaviour; it will be exactly the same situation if you would have played anywhere but the center.

Yeah that's one of the problems with selecting the best continuation every time. Minimax does that and therefore limits the number of continuations.
Link to comment
Share on other sites

If I let the script to have the first move, it will always be the center (best square) so it won't change the behaviour; it will be exactly the same situation if you would have played anywhere but the center.

You mean centar 2,2 or 1,1 - 1,3 - 3,3 - 3,1

So you see, you have 5 sarting positions so that noone can win and not 1 ^^

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
Share on other sites

You mean centar 2,2 or 1,1 - 1,3 - 3,3 - 3,1

Center is 2-2.

I wanted to make it impossible to beat and I didn't have too much time to spend on the script; that's why my approach was the most efficient one. This script plays defensive that's why I named it "unbeatable".

When I'll finish the next one, I'll name it "I Might Beat You Tic-Tac-Toe" and it will play offensive as well. I just hope I will find some time for that :)

Edited by enaiman

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...