Previous Blog Next Blog
Prev/Next Blog
by date

My AI is so frustrating

My AI is so frustrating
Name:Scott Coursey 
Date Posted:Dec 24, 2006
Rating:Not Rated
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Scott Coursey

Blog post
I have a long way to go before I complete my strategy AI. The reason I'm saying it's frustrating is because it's working very well. Ok, too well. As I'm testing the AI, I need to play around with it during a game.

I'm realizing that I can't really beat it.

Not that it's flanking me and wiping out my forces or anything. It just sits on its Keeps and buys more units when needed. It's forcing me to come to it.

Just now, I had enough gold to purchase 27 soldiers. Talk about a huge battle. I gave up.

Recent Blog Posts
List:01/24/07 - Claude gets a makeover
12/30/06 - Finally, I can beat my game!
12/24/06 - My AI is so frustrating
12/22/06 - Progress on strategy AI...
12/17/06 - Gotta love scripts...
12/12/06 - My brain hurts...
11/29/06 - Raiders of Leeros pre-beta DEMO
11/26/06 - Filtered Movement Maps Done

Submit ResourceSubmit your own resources!

Brian Hill   (Dec 24, 2006 at 04:24 GMT)
LOL...I felt that way after I combined AITurrets with guided rockets (with the precision turned all the way up) in something I'm working on...OUCH!

In any case, it's easier to make a smart AI dumber than it is to make a dumb AI smarter.

Anton Bursch   (Dec 24, 2006 at 04:50 GMT)
There's game programming and then there's game ai programming... boy... whew.

Tom Eastman (Eastbeast314)   (Dec 24, 2006 at 05:49 GMT)
Along with what Brian said, I've found that it's important to remember that the game is supposed to be fun. Challenges are great, but if the AI plays like a griefer, there's no point in playing single player ;)

Can't wait to see it in action though!

Scott Coursey   (Dec 24, 2006 at 06:38 GMT)
I just know I'm having fun. It took me two days to find a single error in my algorithm. Once that was solved, things just started falling together.

Hey, for a teaser (and to get a feel for the style), here's a sketch I did last night of a dragon I'm going to put in.

courseytechnologies.com/graphics/screenshots/dragon_rough.png

Of course, it'll be scaled down (pun) and colored. The fine details won't show up in the final version.

Oliver Rendelmann - DerR   (Dec 24, 2006 at 08:43 GMT)
You have to come up with a few factors that simulate human faults. For instance.. if he sees "oh sh.. i need more units" add some little time before he starts building it. That might simulate panic if your opponent was a human and just found your overwhelming army. :)

Scott Coursey   (Dec 24, 2006 at 12:47 GMT)
Yeah, that's in the works. I want to make it a strong AI for now, but I'll throw in some randomness and "dumb" points later. That way, if the player wants to play against a tough opponent (or it's called for in Campaign mode), the AI will be ready.

I did run into the overwhelming army yesterday. The AI had a Keep with nothing defending it. I approached, and it used all its gold to purchase soldiers. Me with my poor little single guy against an onslaught. It wasn't pretty.

Jason Reid   (Dec 24, 2006 at 14:35 GMT)
One thing to consider...maybe instead of just dumbing the AI down / giving it human faults / etc, you could consider changing the rules of the game so that the unfun strategy that the AI uses isn't effective.

If the AI is just turtling (booooring!), but you can beat him anyway, then fix the AI.

If the AI is just turtling, and you can't beat that strategy, then fix the rules of the game. Otherwise, it'll be just how your opponent plays in (potential) multiplayer.

Tony Richards   (Dec 24, 2006 at 16:07 GMT)
Ya, what Jason said.... if you can't beat a turtle then take a careful look and make sure the game is still fun.

Treb Connell(formerlyMasterTreb)   (Dec 24, 2006 at 16:36 GMT)
The same thing happened to me when I modified the AIPlayer's to aim ahead of the opponent and take gravity into affect, I could beat it only 10% of the time.

Scott Coursey   (Dec 24, 2006 at 17:51 GMT)
How about removing the turtling behavior for just the AI, and not the player. I see it perfectly appropriate for the player to turtle himself if necessary, to defend against a strong opponent. I could also raise the prices of the units for the AI so it could buy things more slowly.

Dx   (Dec 24, 2006 at 22:49 GMT)
do you have a construction time for units? if you don't you could add one or if you do you could make it so that when the AI goes a turtlin and trys to build loads of units you could make a system that queues the units that the ai wants to build but depending on the queue slot the amount of time that it would take to build would be longer, so for instance if the ai wanted to build just one model it would take the normal amount of time to build it but if it wanted to build two, the 2nd one in the queue would take the amount of time of a normal build plus 2 seconds or something like that, you could make it so the amount of build time is assigned when the ai queues to try and cut down on some problems.

i mean i suppose you could make that rule global, cause i'm guessing the human element would figure that out pretty quickly when it's about to be slaughtered and is shouting at the screen "COME ON!!!!, just a little bit more! PLEASE COME ON, BUILD DAMN YOU!", plus as an added bonus it would stop people turtling like that in multiplayer games, would also add a fun yet very frustrating element to multiplayer matches, also other humans in the multiplayer games would be able to guess where the enemy human is focusing the attension by how the stronghold is building which might add a lil more strategy and fun cause people could choose to either demoralise enemy human players by attacking and taking over strongholds that they guess the enemy human is focusing it's attension at or just try and be sneaky and take strongholds that the guess aren't being monitored at the time.

a cool idea that you could implement would be if the camera is within a certain distance of a unit or a stronghold the unit gets a moral bonus or a stat bonus of somekind and the strongholds in that area build a little quicker....ok maybe that idea cancels out my suggestion of solving the problem....sorry, i tend to go off on a tangent.

is this for the the raiders of leeros game that i read and saw screenshots about or is it something new?....just curious :P

oh well, sorry, gone on enough, i'm just think-typing don't know if anything i said helps or anything like that, hope it does good luck and hope to hear more from you :)
Edited on Dec 24, 2006 23:02 GMT

Scott Coursey   (Dec 25, 2006 at 00:59 GMT)
@Dx: Yes, this is all for The Raiders of Leeros. I have several other ideas to mull about, but I don't want to get sidetracked with another project yet.

I like the idea of slowing the build time down for the AI. As for the general rule, no, there is no construction time. You request it, they pop out. While it does make sense for a construction time, I hadn't considered it until now.

As for the number of seconds, that won't work in this game. Since it's turn-based, you could see your enemy approaching one turn, then the next, you could be overrun. If I implemented the rule of "request a build, get the unit next turn", that would eliminate the turtles, mostly, but could also introduce some chances the units, gold, keeps, etc could get lost while waiting for them to come out.

Well, that is just part of the game, I guess.

I have lots to think about.

I'll get my AI written up, the way it's designed, and hopefully get a demo out to y'all and get some feedback. I already have the multiplayer part done, so it's basically: AI, unit art, sound, and campaign mode (maps, storyboard, etc). The core engine (scripts) work wonderfully.

You must be a member and be logged in to either append comments or rate this resource.