3D Tic-Tac-Toe (deceptively tricky)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • stargroup100
    behanjc & me are <3'ers
    FFR Simfile Author
    FFR Music Producer
    • Jul 2006
    • 2051

    #1

    3D Tic-Tac-Toe (deceptively tricky)

    For practice, I coded this cute little puzzle game.



    Source code: http://www.cosmovibe.com/programs/sangaAI.cpp
    If it's not working, you might need this: http://www.microsoft.com/en-us/downl....aspx?id=30679
    Currently trying to rewrite the game in html5 so that everyone can play on a browser, without the need to download the packages.


    I haven't decided yet if I wanted to continue working on this to find the perfect play solution, but at the moment the AI should already be very strong at max difficulty.
    Last edited by stargroup100; 01-21-2014, 08:13 AM.
    Rhythm Simulation Guide
    Comments, criticism, suggestions, contributions, etc. are all welcome.

    Piano Etude Demon Fire sheet music
  • Charu
    Snivy! Dohoho!
    FFR Simfile Author
    • Mar 2006
    • 6161

    #2
    Re: 3D Tic-Tac-Toe (deceptively tricky)



    Welp...


    Originally posted by JohnRedWolf87
    Charu the red-nosed Snivy
    Had a very shiny nose
    And if you ever saw it
    You could even say it glows

    All of the other Snivies
    Used to laugh and call him names
    They never let poor Charu
    Join in any Snivy games

    (Click the arrow to see the rest)


    Originally posted by Vendetta21
    All in all I would say that Charu not only won this game, his play made me reconsider how I play it.

    Comment

    • Xiz
      TWG Chaos
      FFR Simfile Author
      • Feb 2012
      • 3399

      #3
      Re: 3D Tic-Tac-Toe (deceptively tricky)

      Wtf I downloaded this and this is porn

      EDIT: I just was playing porn in the background. Nvm.

      Comment

      • Netjet!
        Sic itur ad astra
        FFR Simfile Author
        • Jan 2008
        • 4701

        #4
        Re: 3D Tic-Tac-Toe (deceptively tricky)

        Originally posted by Xiz
        EDIT: I just was playing porn in the background. Nvm.
        lmfao

        edit: Was missing two dll files, found them, then got this error:

        Last edited by Netjet!; 01-20-2014, 01:56 PM.
        RIP Steve Van Ness <3

        Comment

        • stargroup100
          behanjc & me are <3'ers
          FFR Simfile Author
          FFR Music Producer
          • Jul 2006
          • 2051

          #5
          Re: 3D Tic-Tac-Toe (deceptively tricky)

          Oops. I uploaded the wrong one. It should be working now.
          Rhythm Simulation Guide
          Comments, criticism, suggestions, contributions, etc. are all welcome.

          Piano Etude Demon Fire sheet music

          Comment

          • Charu
            Snivy! Dohoho!
            FFR Simfile Author
            • Mar 2006
            • 6161

            #6
            Re: 3D Tic-Tac-Toe (deceptively tricky)



            Apparently a short google search says it's because I need Visual C++ 2010.

            I recall me getting this, but meh.


            Originally posted by JohnRedWolf87
            Charu the red-nosed Snivy
            Had a very shiny nose
            And if you ever saw it
            You could even say it glows

            All of the other Snivies
            Used to laugh and call him names
            They never let poor Charu
            Join in any Snivy games

            (Click the arrow to see the rest)


            Originally posted by Vendetta21
            All in all I would say that Charu not only won this game, his play made me reconsider how I play it.

            Comment

            • stargroup100
              behanjc & me are <3'ers
              FFR Simfile Author
              FFR Music Producer
              • Jul 2006
              • 2051

              #7
              Re: 3D Tic-Tac-Toe (deceptively tricky)

              SIGH

              lemme figure this out ugh
              Rhythm Simulation Guide
              Comments, criticism, suggestions, contributions, etc. are all welcome.

              Piano Etude Demon Fire sheet music

              Comment

              • YoshL
                Celestial Harbor
                FFR Simfile Author
                FFR Music Producer
                • Aug 2008
                • 6156

                #8
                Re: 3D Tic-Tac-Toe (deceptively tricky)

                P1: center
                P2: arbitrary move, at most will block 1 option
                P1: create 2 in a row so that the other player has to block without getting 2 in a row
                P1: last move to have 2 possible winning moves, game over

                something like that, i remember playing this alot


                Originally posted by Charu
                Only yours, for an easy price of $19.99! You too can experience the wonders of full motion rump sticking.

                Comment

                • Netjet!
                  Sic itur ad astra
                  FFR Simfile Author
                  • Jan 2008
                  • 4701

                  #9
                  Re: 3D Tic-Tac-Toe (deceptively tricky)

                  Did you figure out what was up with this? I really want to try it haha
                  RIP Steve Van Ness <3

                  Comment

                  • stargroup100
                    behanjc & me are <3'ers
                    FFR Simfile Author
                    FFR Music Producer
                    • Jul 2006
                    • 2051

                    #10
                    Re: 3D Tic-Tac-Toe (deceptively tricky)

                    k a friend told me if I really wanna make sure everyone can play this I should rewrite it in html5 or something

                    gimme like a day or two
                    Rhythm Simulation Guide
                    Comments, criticism, suggestions, contributions, etc. are all welcome.

                    Piano Etude Demon Fire sheet music

                    Comment

                    • stargroup100
                      behanjc & me are <3'ers
                      FFR Simfile Author
                      FFR Music Producer
                      • Jul 2006
                      • 2051

                      #11
                      Re: 3D Tic-Tac-Toe (deceptively tricky)

                      I posted a package that should fix the problem


                      still gonna rewrite the code for html5 but in the meantime you guys can use that if you want
                      Rhythm Simulation Guide
                      Comments, criticism, suggestions, contributions, etc. are all welcome.

                      Piano Etude Demon Fire sheet music

                      Comment

                      • Izzy
                        Snek
                        FFR Simfile Author
                        • Jan 2003
                        • 9195

                        #12
                        Re: 3D Tic-Tac-Toe (deceptively tricky)

                        Code:
                        string hex(int k) {
                        	switch (k) {
                        		case -1:
                        		return "-";
                        		case 0:
                        		return "0";
                        		case 1:
                        		return "1";
                        		case 2:
                        		return "2";
                        		case 3:
                        		return "3";
                        		case 4:
                        		return "4";
                        		case 5:
                        		return "5";
                        		case 6:
                        		return "6";
                        		case 7:
                        		return "7";
                        		case 8:
                        		return "8";
                        		case 9:
                        		return "9";
                        		case 10:
                        		return "A";
                        		case 11:
                        		return "B";
                        		case 12:
                        		return "C";
                        		case 13:
                        		return "D";
                        		case 100:
                        		return "W";
                        		default:
                        		return "0";
                        	}
                        }
                        seems like you could declare a character array such as the following then use the value k to index the array.
                        [ - ][ 0 ][ 1 ][ 2 ][ 3 ][ 4 ][ 5 ][ 6 ][ 7 ][ 8 ][ 9 ][ A ][ B ][ C ][ D ][ W ]

                        Code:
                        string hex(int k) {
                                        if (k >= -1 && k <= 13)
                                        { 
                        		          return array[k];
                                        }
                                        else if (k == 100)
                                        {
                        		          return array[14];
                                        }
                                        else
                                        {
                        		          return array[1];
                                        }
                        }
                        If I wasn't lazy I'd probably look through all of it. I'll definitely play it when I get home though.
                        Last edited by Izzy; 01-21-2014, 08:39 AM.

                        Comment

                        • stargroup100
                          behanjc & me are <3'ers
                          FFR Simfile Author
                          FFR Music Producer
                          • Jul 2006
                          • 2051

                          #13
                          Re: 3D Tic-Tac-Toe (deceptively tricky)

                          yeah that's probably way easier, I'll keep that in mind

                          I'll be honest, I haven't taken the time to optimize or clean up my code. I implemented a lot of extra functions and stuff in order to assist me with debugging. a lot of stuff, including that function, could probably be taken out. at the moment the program is just functional lol
                          Rhythm Simulation Guide
                          Comments, criticism, suggestions, contributions, etc. are all welcome.

                          Piano Etude Demon Fire sheet music

                          Comment

                          Working...