LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tic Tac Toe Coding Challenge

If player A is better than player B in the sense that A forces the random player to win more times than B, but when play against each other results 100% draws who's the winner if the scoring does not include the random player scores. A tournament with 100 of A's and 100 of B's whos the winner?
0 Kudos
Message 71 of 183
(3,632 Views)
Cosmin,

I think I understand your reasoning.

Assuming each entry plays against each other entry, then the total number of points accumulated will be defined mostly by the clearly "inferior" opponents.  In this way, and the assumption that there'll be more weak entries than strong ones means that the weighting of the scores favours the results against the "weak" opponents.

So perhaps it's worth conecentrating on beating the weaker algorithms before going onto the better ones....

Or maybe I should just start at all.  Still haven't had time.  I might miss this one, as my immediate future is jam-packed with other (less fun) stuff to do.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 72 of 183
(3,611 Views)
Scoring is an issue that remains to be settled.  Right now, I think I will play each player against the others 100 times each as X and 100 times as O.  For ties, I will probably run eacb player against the random player a million times or so.  If there is still a tie, I will run a player against itself a million times or so and calculate its average playing time, and the fastest player will win.
 
Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 73 of 183
(3,614 Views)

The fastest player.

😄

Sorry for the confusion CC.

I'm ... humm...  There's a delay in my posts...  It refers to older posts..    I'm stuck in a time-warp, and my guess is that this reply is not helping, either.

 

So let me try again... 

I'll start with Christian:  When playing against him, we always draw.  Regardless of who is first.   There seem to be few patterns emerging from the contest, the X & O's pretty much start off the same way (predicatable).

CC:  I am still using your baseline.  I added a feature to minotor cheating.  It's included in the original vi tester.  The reason for the illegal move was an error on my part.  I forgot to change the numeric reference when switching first player...  oops!! 😮

I will "test" some approaches using the original baselines from you & Christian.  I will post a baseline if (hopefully when) I loose more often..   However, you beat me to the punch when considering loosing strategies...  I will be considering two approaches: defensive (blocking other player's anticipated moves) & offensive (trying to force player to a move). 

JLV

 

Message 74 of 183
(3,620 Views)

Bruce,

I don't think you will be able to score all the submitted vi's against the random player 1000 000 times : I guess that some contributors, such as myself, will produce rather slow players. While the CC-ref.vi is winged enough for such a contest, my last production is pretty slow, and runs 100 times slower. And I believe that even slower competitors (tree searchers) will appear before the dead line. If you intend to put a timeout on the challenge trials, you should decide it as soon as possible !

From my own experience, 100 plays will not be sufficient to make a difference : too much noise, except if we decide to dismiss any stochastic approach (and that would be a poor decision...). I believe you will need to develop a statistical method : run the players 10x10 times, compute the average and standard deviation, decide if the distance between the players is sufficient (with regard to the st. deviation) to define which one is the best. If not, run the test again, until enough data have been collected to make a decision.

On another hand, you will not be able to prevent biaised self-fight results, since, as Altenbach already pointed out, it is easy to switch the algorithm during self play. A simple uninitialized register, associated to a count of the past moves would do the trick.

So, as you said, "scoring is an issue that remains to be settled" 🙂

Chilly Charly    (aka CC)
Message 75 of 183
(3,605 Views)

Altenbach,

I must apologize: after JLV last post, I have understood that I also made a mistake while using your 001.vi. I probablyI forgot to wire something, and your vi just aligned always 4 pieces in the first row, whatever was played by its opponent !:D

In the context, I thought that it was just a pleasant joke, able to entertain the community, which in turn gave me the Deep Toe idea. Sorry ! 🙂

Thanks to JLV for returning me to the right track.

Chilly Charly    (aka CC)
Message 76 of 183
(3,626 Views)


@chilly charly wrote:

In the context, I thought that it was just a pleasant joke, able to entertain the community, which in turn gave me the Deep Toe idea. Sorry ! :)



I would NEVER....! 😄
Message 77 of 183
(3,616 Views)


@altenbach wrote:

Now take a break and listen to The Dukes of Ted!

I guess they are fans of Bill & Ted's Excellent Adventure.

Excellent! Smiley Very Happy


___________________
Try to take over the world!
Message 78 of 183
(3,592 Views)

Ask about the tall one in the back.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 79 of 183
(3,587 Views)

OK,

here's my first entry.

It's not called ultraconservative for nothing.  I've implemented no X strategy at all yet, just random numbers for now but as O it produces 100% draw against ALL opponents.  IT CANNOT lose as O (and without cheating).  I think I'm pretty sure on that one 😉

This isn't really a serious entry, kind of for fun, but I might just use elements of it to make a nice conservative "wait for a mistake" version.

The only problem now is that nbow I've started, my free time is most likele gone for the next month or so......

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
Message 80 of 183
(3,561 Views)