Tic-Tac-Toe (Noughts and Crosses) Npc Logic Broke Down

Tic-Tac-Toe (Noughts and Crosses) Npc Logic Broke DownA not so redstone-ish video for something I intend to do in redstone anyways ;p I more or less did this for my own sanity so I’d have something to look back on when I go to do the actual redstone logic. Not to mention any valid input from you guys that I may have overlooked so that I don’t build some mess of logic just to find out I’m wrong in some manner or another. Donate: www.paypal.com

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , ,
Filed under roboticaust : Comments (20) : Feb 17th, 2012

20 Responses to “Tic-Tac-Toe (Noughts and Crosses) Npc Logic Broke Down”

  1. roboticaust Says:

    @savagelung
    As in all 9 fire up at the same time? Hmmm, might be able to accomidate. Let me hop in the test world and see how annoying this will be lol.

  2. roboticaust Says:

    @areuthere6
    Yeah I actually reviewed the logic in my test world and did a recording shortly after. It’s uploading/processing atm. But that’s not to say what I figured out isn’t relevant either. Seems both strategies have about the same amount of cheap win conditions and easy ties if the cheap wins are blocked.  Plus figuring out both makes it easy to program my npc to avoid such traps when the player gets first turn. But the unbeatable opponent is the goal.

  3. roboticaust Says:

    @savagelung
    Too confined for such awesomeness. Next video up has a real compact piston display in it. There is certainly no room back there for blockswapping >.>

  4. SuperStishious Says:

    now this is of course assuming the player gets first turn every game to select hte middle block. What if it swaps and AI gets in the next turn and then switches off back and forth? this can also be a test to see if the player can beat the AI when the AI gets the first move rather then the palyer always having the advantage of getting the first move every time

  5. SuperStishious Says:

    @roboticaust OHHH ok i get it more now. after your second video and this comment. i assumed oyu were making an npc for the game but one where the player could sitll win using these double win tactics(i thought red was palyer)

    Now i realize oyur making an npc that is extremely difficult, if not impossible to beat. which is way cooler nad makes alot more sense re watching this

  6. roboticaust Says:

    @zhulslab
    Well the thing is, either I can have it a shift registering data and if it sends out conflicting data (a move already made), then it has to clock and send again; or I can just come up with something new. The problem though is moves wont always happen instantaneously, so that brute force method takes some time the fewer moves are left on the board or if it happens to be unlucky a few times. I’m thinking a new circuit might be cool anyhow. I love making my own parts as it is ;)

  7. livedandletdie Says:

    I’ve played tic tac toe since I was little but that’s the only way of winning that I know of.
    the only other win condition is: starting with a corner but is almost impossible to do.
    XXX
    ooX
    ooX It usually only works when you have extra rules in play as nobody can’t take the middle one until turn 4 but is really improbable to win with.

  8. roboticaust Says:

    @savagelung
    Not quite since you have 8 of those blocks lying on the very edge. You need room for the pistons to move the blocks underneath, so its more than 9×9 no matter how you do it.

  9. Iburinoc Says:

    @roboticaust Did I?  Sounds like something I would do. 3 patches back then is about 3 months, so wow! Long time!

  10. areuthere6 Says:

    @roboticaust
    I’m not so sure about that; I can see numerous instances in the layout where a ‘double win condition’ is formed. example: (frames numbered 1-9 from left to right, top to bottom) frame 1, 4, 9 for X. a win can be formed in frame 2 or 7 on the next turn. however, that’s not to say that the map should be used exclusively, after all what fun is an unbeatable opponent?

    p.s. would love to see you try to construct a connect 4 AI opponent :P

  11. savagelung Says:

    @roboticaust Can’t wait to see it!

  12. roboticaust Says:

    @SuperStishious
    I want an intelligent player-made npc in minecraft. And I have no intentions on half-assing ;D

  13. roboticaust Says:

    @Iburinoc
    I think it was around late may actually. I do recall someone sending me a world save with a ton of work done to turn my display into a functioning 2 player game with all the bells and whistles.

  14. roboticaust Says:

    @Iburinoc
    I swear you showed me it too in pm. Yeah, that display of mine was pretty goddamn awesome considering pistons weren’t around in 1.5. I gave him that idea in like 1.2 and it took 3 patches to get him to do it lol.

  15. Iburinoc Says:

    When you guys made tic tac toe and showed it, I like the idea so much that I made my own, using your display! It had win detection, turns, and a full control room!

  16. roboticaust Says:

    @savagelung
    I didn’t do a full display, but an example to see the verdict on how big it should be.  Kinda want feedback before I ramp up the project :)

  17. savagelung Says:

    @roboticaust Oh sorry no, I thought the 9×9 you were looking at in this video was also your design for your display, which used triple block swappers (neutral, x-color and o-color), instead of push-out X’s and O’s. I thought that was pretty cool. I see I was mistaken :P

  18. roboticaust Says:

    @SuperStishious
    Red was npc, Green was player. If you watched, I was screwing around with both more or less. The goal is to make an npc that can act and react to player moves to win or at the very least tie.

  19. Iburinoc Says:

    @roboticaust I really like doing big builds with redstone. Right now, I’m working on a snake game, but it’s kind of on hold right now.

  20. savagelung Says:

    Cool project, I so wish I had the time to think about this right now.

    As a side-note, is your display meant to be this size? Because I would really like to see an array of 9 triple block swappers that fits in a 9×9.

Leave a Reply

You must be logged in to post a comment.