Rabbit/Butterfly - GameSalad Tic-Tac-Toe with computer opponent (Arcade link now working)
Thought I'd spend a few hours today seeing how difficult it is to add a computer opponent to tic-tac-toe made in GameSalad.
If you manage to beat the computer (or it doesn't recognise a win by the computer) please screen shot it and mail it to me at support@armelline.com - it'll mean I need to fix the AI! I'm pretty sure I missed at least one computer win condition. Once I'm sure the AI is unbeatable I'll add easier difficulties!
http://arcade.gamesalad.com/games/130847
Edit: The version originally posted didn't work in Arcade. After some serious troubleshooting, this seems to be down to Arcade flat out failing to run the tableColSum function. I've removed it and published a new version, but if I've missed a tableColSum anywhere (it was used a lot) things will still break. Let's find out!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Comments
A video in the meantime:
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Wow, this is a game I came here to make
Nice work
Thanks for the feedback!
Can't figure out why it's skipping conditions in Arcade. Perhaps it's time to do a bit of a condensing and cleanup of the logic and see if it's still a problem then.
@BlackClockGS any insight onto major differences between how projects are run in Creator/on device and in the Arcade?
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline, which version did you publish with?
In the past, inactive/commented out rules would still be executed in the HTML5 build and cause these inconsistencies.
I am not sure if, or to what extent, this is still the case in the current version, I have not tested it, but have not noticed any problems in the last build.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
I've been using 0.13.13, but I don't have any inactive rules that I'm aware of.
It seems to be completely failing to complete some fairly basic rules at a few points. I vaguely suspect it has to do with the tableColSum function - that doesn't seem to be getting run anywhere.
Edit: Yes, it definitely seems to be to do with tableColSum - I just switched it out in one place that place is no longer failing. Now to just find and replace it in all the other places it's used and see if that fixes the rest of the problems...
Edit 2: I see there's already a bug submitted regarding (probably) this issue by you @Hopscotch. Seems they're not in a hurry to fix this bug
Let's try this again, with (hopefully) all the tableColSum's removed:
http://arcade.gamesalad.com/games/130847
Fingers crossed it works this time!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline, yes, the tableColSum does not work in HTML5 and I posted the bug long time ago. Forgot about that one.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
Computer beaten on the 3rd attempt, the two first were draws - screenshot sent, gl
Very nice project by the way @Armelline!
Publishing on the arcade is really great at the moment, apart from minor shortcomings like the above tableColSum bug and the fact that audio volume settings get ignored.
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
I thought for a moment that was a big mistake being made by the computer, but it looks like it's this damn tableColSum again making it fail to spot that column needs blocking. Well found and thank you! Fix incoming!
Edit: Should be fixed now!
Thanks! Was a fun little project for a Saturday afternoon after walking the dogs!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Awesome project - can't beat it!
My GameSalad Academy Courses! ◦ Check out my quality templates! ◦ Add me on Skype: braydon_sfx
@Braydon_SFX Thanks!
Well now that's fixed, time to start thinking about next steps. I'll add extra difficulties to this first I think - currently the computer (should) always play a perfect game, making it impossible to beat. Adding a couple of easier difficulties shouldn't be particularly tricky. After that it's on to a more complex board game. Think chess is still a fair way off, though...
One thing I found particularly interesting doing this is that GameSalad can run through these logic trees blisteringly fast. I actually had to deliberately slow it down at points, and even now it plays too quickly - the computer moves sometimes before I've even mentally registered my own move.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Try a single player game of Go next?
just thinking about that makes my brain hurt.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
Looks great! Can't beat it! How about connect four next?
As connect 4 is also a solved game, it might be an interesting challenge. However, for my next computer opponent I think I'll specifically go for an "imperfect" one that is beatable and plays a little more randomly than the unforgiving one in my tic-tac-toe game.
I'm strongly leaning towards Quarto as my next adventure into GameSalad AI.
On a slightly different note, I don't have any specific intention to release the project file for Rabbit/Butterfly, but if people are interested I could talk through it and demonstrate how the computer player was achieved.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I would love that. I would even pay for it i you could talk me through creating different difficulties
Updated with 5 difficulty settings. Hopefully I didn't break it! You can change the difficulty at any time.
http://arcade.gamesalad.com/games/130847
That's all I plan for this game, unless it turns out I broke it putting the difficulties in.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline I've run into issues with HTML5/Arcade versions of all my games. They appear to work at first, then it seems that state degrades as the games start to behave oddly. I've submitted one of my projects for GS to have a look at, but haven't heard anything further (couple of weeks ago).
Bottom line is that if you are experiencing differences in Arcade, I wouldn't spend too much time trying to sort it out. I think it's something GS needs to sort.
Our games http://Donkeysoft.ca
Ok update! I just heard from GS and they found some issues with the HTML5 engine. Differences from the Android and iOS engines. They have made the changes and are planning on updating the Arcade servers soon.
I'm very impressed with the turn around from GS. Shows that they are paying attention. The difference for my project was table manipulation. Apparently there were places where rows were being deleted that didn't exist, and values being put into columns where the types didn't match. This doesn't crash the iOS/Android engines, but the HTML5 engine doesn't like it and would exhibit odd behaviours.
Our games http://Donkeysoft.ca
smart game!!!
@clee2005 Thanks for the update! Hopefully they take this opportunity to fix the tableColSum bug too!
@Riveraonline Thanks!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline Thanks for sharing!
Big Smile Games Play Happy!
Check out our other GameSalad exclusives.
I always half-intended to release the project file for this for people to look at and play with, but never did as the rules restricted how I could do so far too much for it to be worth it.
The rule preventing me from creating a new thread to post the project file for this has now been relaxed, so I'm contemplating doing so.
Is there any interest in how this was done? It's not particularly clever, but might be of interest to some.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@Armelline Yes it would be intersting to look at
Forgot all about this. Will throw it up on GSHelper soon (for free), so keep your eyes peeled!
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
...
How were you able to make the AI
Tic tac toe is a solved game, so you just need to have the computer run through the steps listed on the wiki page:
https://en.wikipedia.org/wiki/Tic-tac-toe
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
@armelline, Can't seem to find it on GSHelper. Did you eventually put it up? Trying to wrap my head around AI so looking for as many examples as I can.