Hey guys so i’m coding a Connect 4 game for a school project. (Last year of high school)
I would really love to implement some kind of AI so the computer can play with the player. I’ve already done an AI for a tictacto by just using if and else if for each possible combination. However i feel this would extremely too long to code for a 7*6 connect 4 game.
If you guys could help me out i would appreciate it so much. I’m a visual person so if you could screenshot a piece of code it would really help me understand.
Home work assignments are not something the volunteers usually do for someone… what we can/will do is help you with mistakes you may make… but this means making an effort to do your work on your own and show us that your at least tried.
And for the record… an If/Then/Else based AI is not the way to approach this problem.
So, you know the alogrithm you want to use… show us how you attempted to implement it.
Its in “C”, and I would say “so what”… do some research, compare what you see in “C” to what you know in Xojo,
ask pointed questions… and above all else “Learn Things”… remember the Information Technology world is much broader than just Xojo, and the more you know, the more marketable you will be…
Okay, thanks for your advice Dave. I will do some more research on the algorithm and how to implement it.
One more question for you:
For the interface of the program I would like to make it all in one canvas. I looked online for some object oriented tutorials on xojo. I couldn’t find any that explained how to get started and they were all very dated. If you could point me in the right direction on how to draw the game area that would be greatly appreciated.
It isn’t Xojo but they cover everything you have to know about AI in games. Xojo is not really a game development tool, Construct is. That is the reason you will find more information at the Scirra forum than here.
If you visit the Scirra website, you will see what I mean. The example game Tim Parnell gave, is very very basic, too basic, not AI at all.