Computer Science Canada Connect-4 |
Author: | Zampano [ Thu Dec 20, 2007 3:32 pm ] |
Post subject: | Connect-4 |
I got the idea for this game during a slow and boring Civics class. It's Connect-4, except you can drop your checkers in from two different directions. It's a whole different game playing this way. I encountered a small error; when I was using whatdotcolour for checking if there were four in a row, it didn't seem to pick up the colour 40 (red); when I switched to 12, it worked just fine. I guess that it only picks up the smaller numbers. Does any one know why that is? |
Author: | Zampano [ Sat Dec 22, 2007 10:42 pm ] |
Post subject: | Re: Connect-4 |
I would greatly appreciate it if some one might offer feedback on my programming conventions. However, I understand if this production does not merit such attention. |
Author: | Ultrahex [ Sat Dec 22, 2007 10:47 pm ] |
Post subject: | Re: Connect-4 |
Its a cool idea, some AI would make it pretty good... i recommend actually finishing the game though first before writing the AI. I think that is one of the main things people forget to do when making games and such ... they will make the main concepts of the game... but never work on the finishes touches such as graphics, or menus, or options etc.... just a thought. |
Author: | Zampano [ Thu Jan 10, 2008 3:23 pm ] |
Post subject: | Re: Connect-4 |
I hope know one minds this being bumped, but I've been trying to crack the egg/mystery that is this kind of AI. I haven't done any computer control before (save for Pong), so it's slow going. I eventually decided to use and 2D array of a record holding two enums, one for the urgency of moving to a specific place on the grid to block enemies, and another to show the benefit of to oneself of moving somewhere. It is getting more and more complex and yet I can think of tens of ways the AI still pales against a human. I think that I need to step back and rethink the way I'm doing this in the first place. Does any one have some basic advice about creating AI that is widely applicable? I do not want help with this specifically, just basic advice. Also, I never intended this to have menus in the first place. The version posted is as complete as it will be except for possibly the AI. |
Author: | zylum [ Thu Jan 10, 2008 3:33 pm ] |
Post subject: | RE:Connect-4 |
Look into the minimax algorithm.. It is probably the simplest for this purpose. It wont be amazing but with a few optimizations it could be good enough. |
Author: | skilly [ Mon Jan 14, 2008 2:51 pm ] |
Post subject: | Re: Connect-4 |
that was kind of wierd, but still fun |
Author: | Tallguy [ Mon Apr 14, 2008 12:02 pm ] |
Post subject: | RE:Connect-4 |
the games okay, it easy to beat it though |
Author: | repsoccer16 [ Tue Apr 15, 2008 7:58 am ] |
Post subject: | RE:Connect-4 |
prettty good game. |
Author: | crysis [ Tue Apr 15, 2008 8:27 am ] |
Post subject: | RE:Connect-4 |
you should put and AI in it and get don't allow the user to play on the side. |