Go Back   Flash Flash Revolution > General Discussion > Technology
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
Old 01-20-2014, 02:29 PM   #1
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default 3D Tic-Tac-Toe (deceptively tricky)

For practice, I coded this cute little puzzle game.

http://www.cosmovibe.com/programs/sangaAI.exe

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 at 09:13 AM..
stargroup100 is offline   Reply With Quote
Old 01-20-2014, 02:33 PM   #2
Charu
Snivy! Dohoho!
FFR Simfile AuthorFFR Veteran
 
Charu's Avatar
 
Join Date: Mar 2006
Age: 33
Posts: 6,161
Default Re: 3D Tic-Tac-Toe (deceptively tricky)



Welp...
__________________


Quote:
Originally Posted by JohnRedWolf87 View Post
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)


Quote:
Originally Posted by Vendetta21 View Post
All in all I would say that Charu not only won this game, his play made me reconsider how I play it.
Charu is offline   Reply With Quote
Old 01-20-2014, 02:44 PM   #3
Xiz
TWG Chaos
FFR Simfile AuthorFFR Veteran
 
Xiz's Avatar
 
Join Date: Feb 2012
Location: Cali4nia
Age: 32
Posts: 3,399
Send a message via Skype™ to Xiz
Default 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.
__________________

Xiz is offline   Reply With Quote
Old 01-20-2014, 02:50 PM   #4
Netjet!
Sic itur ad astra
Retired StaffFFR Simfile AuthorFFR Veteran
 
Netjet!'s Avatar
 
Join Date: Jan 2008
Location: Ottawa, Canada
Age: 30
Posts: 4,700
Send a message via AIM to Netjet! Send a message via Skype™ to Netjet!
Default Re: 3D Tic-Tac-Toe (deceptively tricky)

Quote:
Originally Posted by Xiz View Post
EDIT: I just was playing porn in the background. Nvm.
lmfao

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

__________________
RIP Steve Van Ness <3

Last edited by Netjet!; 01-20-2014 at 02:56 PM..
Netjet! is offline   Reply With Quote
Old 01-20-2014, 05:46 PM   #5
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default 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
stargroup100 is offline   Reply With Quote
Old 01-20-2014, 06:04 PM   #6
Charu
Snivy! Dohoho!
FFR Simfile AuthorFFR Veteran
 
Charu's Avatar
 
Join Date: Mar 2006
Age: 33
Posts: 6,161
Default 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.
__________________


Quote:
Originally Posted by JohnRedWolf87 View Post
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)


Quote:
Originally Posted by Vendetta21 View Post
All in all I would say that Charu not only won this game, his play made me reconsider how I play it.
Charu is offline   Reply With Quote
Old 01-20-2014, 06:06 PM   #7
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default 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
stargroup100 is offline   Reply With Quote
Old 01-20-2014, 09:25 PM   #8
YoshL
Celestial Harbor
FFR Simfile AuthorFFR Music ProducerD7 Elite KeysmasherFFR Veteran
 
YoshL's Avatar
 
Join Date: Aug 2008
Location: Celestial Harbor
Age: 30
Posts: 6,156
Send a message via AIM to YoshL Send a message via MSN to YoshL Send a message via Skype™ to YoshL
Default 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
__________________


Quote:
Originally Posted by Charu View Post
Only yours, for an easy price of $19.99! You too can experience the wonders of full motion rump sticking.
YoshL is offline   Reply With Quote
Old 01-20-2014, 11:30 PM   #9
Netjet!
Sic itur ad astra
Retired StaffFFR Simfile AuthorFFR Veteran
 
Netjet!'s Avatar
 
Join Date: Jan 2008
Location: Ottawa, Canada
Age: 30
Posts: 4,700
Send a message via AIM to Netjet! Send a message via Skype™ to Netjet!
Default 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
Netjet! is offline   Reply With Quote
Old 01-21-2014, 04:08 AM   #10
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default 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
stargroup100 is offline   Reply With Quote
Old 01-21-2014, 09:14 AM   #11
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default 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
stargroup100 is offline   Reply With Quote
Old 01-21-2014, 09:37 AM   #12
Izzy
Snek
FFR Simfile AuthorFFR Veteran
 
Izzy's Avatar
 
Join Date: Jan 2003
Location: Kansas
Age: 33
Posts: 9,192
Default 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 at 09:39 AM..
Izzy is offline   Reply With Quote
Old 01-21-2014, 10:39 AM   #13
stargroup100
behanjc & me are <3'ers
FFR Simfile AuthorFFR Music Producer
 
Join Date: Jul 2006
Posts: 2,051
Default 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
stargroup100 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 10:03 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright FlashFlashRevolution