Frogboy Frogboy

You humans…

You humans…

image

I’m an AI guy. And that means I’m often a lonely guy. Like right now here at 2am. That’s because when I’m in the zone on AI coding, I just can’t take interruptions. Unfortunately, during the day, that’s largely unavoidable since I run a software company whose primary business isn’t making computer games.

But AI is my passion.  I just wish I had more time to dedicate it.

I won’t kid you. There’s a reason why AI in these fantasy games are usually terrible (or cheat like mad).  It’s hard. Really hard to get them to intelligently use magic.

You humans don’t help. Sometimes, my AI advocacy hat gets in the way of my game designer hat.  This was somewhat notorious in the old Galactic Civilizations builds years ago because I’d intentionally make things “harder” for the human to give the AI a leg up.

It snuck into Elemental too but these bloody public betas with so many people now scrutinizing that I can’t get away with my AI cheese.

Case in point: Learning spells.  The way it worked in Beta 2 was wonderful for the AI but awful for humans. If you had enough spell points, you would open up the spell book, find a spell, and “learn it”.  The AI, of course, is endlessly vigilant and would check, every turn, to see if he had enough spell points to learn a spell. Humans, by contrast, are lazy. Wonderfully lazy. So they’d let their spell points max out and be wasted.

Sadly, humans complained and so in Beta 3 you can queue up the spells you want to learn and as long as the spell doesn’t require more spell points (aka Arcane Knowledge) that you are capable of storing, you can put it into your queue.

(this is the part where people on various external forums condemn me for being a weasel).  But weaseling is what separates us from the animals. Well, except the weasel.

Magical pain for the computer AI

So here’s my Sovereign raising land.  I can create a land bridge (or make an instant beach). Getting the AI to do this intelligently? Very hard.

Here’s me raising land to make a pass through the mountains.

Of course, it being hard is what makes it worth it. :)

NPC Fun

Another fun thing is having the NPCs starting to get more aggressive.

79,996 views 39 replies
Reply #26 Top

Wait a minute... HUMAN!?!?... MEATBAGS! :borg:

Reply #27 Top

There is a lot of discussion noting that cheating AI's can be fun, but without the important caveat:

They can't JUST be cheating.  Every time you declare war in Civ4 the other side magically gets piles of units at the same tech level as you, regardless of where they were before.  Its so blatant it takes all the fun out of things.  But if the cheating is disguised and just looks like a common player strategy done very well then the fun is maintained.

I guess what I'm saying is, if you have to, cheat, but don't get caught doing it!

Reply #28 Top

Quoting fstkfstk, reply 27
There is a lot of discussion noting that cheating AI's can be fun, but without the important caveat:

They can't JUST be cheating.  Every time you declare war in Civ4 the other side magically gets piles of units at the same tech level as you, regardless of where they were before.  Its so blatant it takes all the fun out of things.  But if the cheating is disguised and just looks like a common player strategy done very well then the fun is maintained.

I guess what I'm saying is, if you have to, cheat, but don't get caught doing it!

End of fstkfstk's quote

I disagree with this. Cheating will be caught and will impact the game.

I would define cheating as the AI using some game mechanic which the human can not use. A classic example in Civ3 was the AI's knowledge of where all resources were on the map before it had explored the map and before it had the related tech.

AI cheating undermines a game in two ways:
1) Players will discover it and will be annoyed because it doesn't feel like a fair fight.
2) The AI developer is not under as much pressure to make the AI strategically stronger and more interesting.

I think that Brad's determination to have a non-cheating AI is wonderful. And it is good that he is also watching out for things which can give the AI an edge due to non-cheating mechanics which are tedious to a human.

Low difficulty levels (easier than what the AI is capable of) can easily be implemented in a game by giving the AI a handicap in strength and/or by reducing its "smartness." Higher difficulty than what the AI is capable of are problematic because they can only be implemented by giving the AI an advantage in strength. (It is already at maximum smartness.) If these advantages need to reach a ridiculous level for some players the gameplay at those levels will inevitably turn into something a bit strange, e.g. exploiting AI "puppet strings."

I'm guessing that Elemental will have two distinct AIs, the "world" (or strategic) AI and the tactical combat AI.

I'm making a wild guess that tactical combat will have up to 10 separately controlled units per side on a roughly 10x10 grid, with a worst case of something like 30 to 40 distinct possible actions on a player's turn (after discarding obvious bad choices.) That would be a significantly higher complexity than chess but could still be approached with known techniques. I'd guess a minimax tree with a greater dependence on sophisticated node evaluation than on number of nodes evaluated could (with considerable work! it is anything but trivial) result in a very good tactical AI.

How Brad is approaching the world AI is beyond me to guess. AI techniques for reaching specific goals are better understood than techniques for choosing goals. I think he's in uncharted territory. I'm really looking forward to seeing the result. I think we're going to see a very good AI which will be fun to play against and will get better over time. OTOH I hope people don't expect too much from it. This is hugely difficult stuff and I don't think anyone interested enough in games to be reading this thread should expect an AI which will beat them for long without the AI being given a (visible, non-cheating) advantage.

Reply #29 Top

Clearly, Brad should pack a miniature person into every box and have them play hotseat with us to alleviate him of any AI pains. Agreed, guys?

It sounds considerably easier than what you're currently doing, anyhow. =p

Reply #30 Top

I'd love to see a none-cheating AI that actually challenges the player like a human being would, but I suspect building something of that complexity for a game this intricate would be EXTREMELY challenging and I'm not convinced its been done before (at least not with a game so close to release with so many features still up in the air). 

I suspect SirPleb is right that the only workable approach to this would be to have different AIs handling the various scales.  I would love to see a discussion of how the AI works when the game is finished and shipped.

Reply #31 Top

I always hated the way the Warlords series handled boats.  Then I played everything else and decided they were really nice.

 

If you can get an AI that does handle boats, consider yourself worshiped...

 

If you can't, take one out of the Warlords book and give pathing onto water from harbors, stick em in a boat when they walk over it, and call it a day.

Reply #32 Top

So much complain about boats that now it makes sense why Elemental (at least for vanilla) is only focused in land battles.

Reply #33 Top

And it is good that he is also watching out for things which can give the AI an edge due to non-cheating mechanics which are tedious to a human.
End of quote

I hope so - this even snuck into Galgiv 2 with having to tweak the tax/budget sliders every turn, ugh.

Reply #34 Top

I think the solution would be to set your ai long term goals or give a price for the whole goal.

For example, you want to make a bridge, change the interface so that you could select ever square that you want to raise, total the cost and when you cast the spell the bridge is completely done. Instead of casting multiple times the raise land spell.

This could work for other type of spells like enchantments when you could enchant many units or squares with the same spell.

Now if you use a system like that, it will be easier for the AI to complete what he wanted to do. If he wants to build a bridge, he is going to build it or not, but he is not going to build half of it because he does not have the options to do it.

That was one of the problem with the MOM AI, he had no long term objectives and was changing his mind all the time. If the AI could corrupt your land, he would corrupt one square here and there. But would never finish a project like corrupt all squares of city X. If you design your spells so that a whole city get corrupted, it would solve this problem.

Reply #35 Top

Quoting Hawawaa, reply 26
Wait a minute... HUMAN!?!?... MEATBAGS!
End of Hawawaa's quote

Ahh Star Wars Knights Of The Old Republic HK-47 says that dosent he :D

Reply #36 Top

The way I see it, if there is a discrete strategy to some facet of a game (e.g. sacrificing a pawn so that the expected result is the other player would lose a more valuable piece in the process), then the AI can be taught to perform it, just as easily as the option can be coded into the game ruleset. 

The problem is deciding when the AI should best use that AI.  I think that's where fuzzy logic and some randomization comes in. I think we give humans too much credit for success.  They likely do *some* thinking, e.g. a quick "expected value" calculation, but intuition, experience, and emotion probably figure into why a human chooses to use a particular strategy or not. 

E.g. just being able to think up a particular move, say 3 turns in advance doesn't mean that human player thought of every possible combination of moves they could make for the next 3 turns.  So why can't the AI be considered 'good' if it does the same?  E.g. Just think up a few options and guestimate the best one, even using some randomization to decide on a preferred option.

In general, I'm thinking humans are expecting too much perfection from AI opponents.

Reply #37 Top

Quoting fstkfstk, reply 30
I'd love to see a none-cheating AI that actually challenges the player like a human being would, but I suspect building something of that complexity for a game this intricate would be EXTREMELY challenging and I'm not convinced its been done before (at least not with a game so close to release with so many features still up in the air). 

I suspect SirPleb is right that the only workable approach to this would be to have different AIs handling the various scales.  I would love to see a discussion of how the AI works when the game is finished and shipped.
End of fstkfstk's quote

That is really hard to do, because humans can adapt and do unpredictable things that still make sense more easily then an AI can. The best AI is one that can challenge a human player without cheating, but challenging them like an equally skilled human is nearly impossible in a game like this for sufficiently skilled humans. There's just too many variables. (You can do it in something like chess with suffcient computing power because the number of possible moves and their impact is known and predictable. Throw magic and random events into the mix and it gets way harder.)

At really hard difficulty levels some cheating is inevitable, so the important thing is how it cheats. Getting a production or resource bump is one thing, but it gets lame when the AI is all seeing and can simply bypass building requirements.

Reply #38 Top

When you have a very complex game with many variable, one of the way you can solve this problem is to have a sentient AI.

The concept is simple: The AI takes decisions ( maybe randomly) and keep track of the results in a database. The AI also keep track of the player's behavior.

Now when you have enough stats, you can take a decision according to this information.

For example:

4 times out of 5, I lost more than 50% of my ship when I used a triangular formation. If the AI needs to take a decision for an important battle, it will not take that formation.

Sometimes, the AI should act randomly or use the opposite of the best choice to acquire additional data about this decision which could be useful in some situations.

Reply #39 Top

I think this is a good idea. k1    IMHO it's seriously worth considering, at some stage in development or post-release.  If it's feasible, it might be worth checking it out.

Best regards,
Steven.