I'm designing a game for PvP in which you manage a team of units against your opponent's team of units. In this game, the position and direction of units is very important for multiple reasons.
1. Line of sight: Although the player can see every enemy unit visible to at least one of their units, each unit doesn't necessarily see it.
- They have to be facing it
- There can't be a solid obstacle blocking their view
- If they are partially blocked, then they only gain line-of-sight after other events: enemy movement, noise, or time.
2. Defense
- Solid obstacles prevent a unit from firing at or being fired at.
- Partial obstacles give the unit closest to them the defensive advantage when exchanging fire with an enemy unit.
Standing next to an obstacle can provide full defense from one angle of attack but partial or none from other angles of attack.
Also, just because an obstacle blocks sight doesn't mean it blocks missiles. So there might be something that give 100% obscurity but little defense.
Obviously, developing a game with these terrain advantages is not as easy as "chase, bump, kill". But it is still the easy part of my game. Why? Because I need to figure out what players are going to do when there isn't a human opponent available to play against.
So the insanely hard part: Designing AI opponents that aren't boringly dumb.
The Holy Grail of opponents: Smart AI that doesn't cheat!
- same # of units, no handicap, no special ability to spot you
But coming up with a challenging noncheating computer opponent seems insanely hard for me. So there are other options:
Stupid AI that cheats
- it gets extra units.
- it gets skill handicaps per unit.
- it magically "figures out" where your hidden unit is every once and a while
In the above methods, the system could adjust the "cheating" so that players who keep winning get greater challenge in subsequent matches. The better you are, the more the opponent can cheat.
I think my approach will be to implement stupid AI that cheats a lot because it's quick and easy to do. Then over time improve the AI and reduce the cheating while maintaining a level of challenge to players. Because I expect newbies to login, I'm thinking it would be good to leave the stupid AI methods intact for them. Let the game switch to better methods as their win:lose ratio gets higher.
Points for discussion:
- What AI do you design in your game(s)?
- What AI have you wanted to implement but had to give up because it wasn't doable or feasible?
- What are other methods of "acceptible" cheating by computer opponents?
- What ideas do you have on making a computer strategically smarter in realtime?
- What about borrowing human intelligence by memorizing player opening moves and playing them back in later games?
And finally:
Do you wish there was a BYOND AI guild where members could discuss how to make their computer opponents smarter, and organize AI related resources and tutorials and such? Or is BYOND really more about multiplayer interaction?
ID:152094
Feb 26 2008, 12:19 pm
|
|
In response to Lyndonarmitage1
|
|
Yeah. I was thinking about the whole "cheating" aspect and realize that there is good and bad cheat designs. A good design allows enough cheating to give humans a challenge. A bad design forces so much cheating to make it impossible for humans to beat it.
But what is impossible for a noob might be easy for a veteran. So I think it would be best to let the players decide the parameters of their next match, such as how many units on the enemy team, whether or not they can see thru obstacles, etc. If I get better strategic AI figured out, then I can keep different AI methods separate and let the play choose which method to play against. |
In response to Traztx
|
|
I always figured an ideal AI should be capable of beating a human player every time. Of course, ideal AIs don't really exist unless you have an extremely simplistic game. But once you have one, or as close as you can get to one, then you can assign any difficulty you want because its much easier to tone down an AI's abilities than to make them better.
Impossible AI: Always does the best possible move. Really Hard AI: Does the best possible move 90% of the time. Hard AI: Best possible move 75% of the time. Average AI: 50% of the time Easy AI: 25% of the time Really Easy AI: 10% of the time But a slider bar is probably better still. |
In response to Foomer
|
|
That's a great point and the "in between" settings add unpredictability to the game. So for example you have 2 pathfinding A* methods. The dumb one finds the shortest path. The smart one finds the safest path.
If one A* method is always used, a smart player could rule out some turfs because the enemy won't ever walking thru them. Randomly picking between methods makes for less turfs to rule out, and then you have to play the odds a little bit more. Is it possible to do a slider in DM? |
In response to Traztx
|
|
You could probably make one using html or even Flash/Actionscript. That reminds me I need to speak to Elation on how to use flash with byond.
|
To me the ultimate type of AI is one that makes you forget it's artificial. If the AI is smart enough to be challenging, but often changes how it thinks and occasionally mistakes, then it's going to be one heck of a game!
|
In response to DivineO'peanut
|
|
Speaking of mistakes, I wonder if modelling psychological effects would be interesting. Are there certain aspects of the game that appeal to anger or greed? If you drop a cache of ammo in an open area defended by some hidden units, will the computer send a unit to take the bait out of greed? If you dance a unit back and forth just out of range, will the computer get mad and switch to a more aggressive strategy? Then regulate the psychological weaknesses through some kind of skill check. Like maybe you entice the computer the 1st time, but next time it has a % chance of resisting the urge.
|
In response to Traztx
|
|
This sounds very hard to properly implement, but it'd be awesome if you could. I think the only problem here is regulating weaknesses; this means that after a few games the computer would stop doing mistakes and play like a regular computer again (if you get what I mean).
How about, instead of learning from mistakes as a human would do, the computer would improve in one field of play and become worse in the other? Say, after a few times of taking the bait and rushing to get the ammo cache, the computer would first patrol the area to check if an enemy is hiding. Now the computer won't take the bait but it'd take it much longer to restock on ammo. I wonder if it is possible to model a human mindset without making the computer too obvious or too weak. In one occasion the computer could be very strong and calculating, but then it'd be obvious to players that they're playing against a computer. On the other hand, if the computer would fall for baits and get angry often it'd be too weak. |
In response to DivineO'peanut
|
|
Good point, and that goes back to the idea of blending the AI versions. So let's say you have emotional vs dispassionate response. Start at 100:0. Same with stupid vs smart methods like nearest path vs safest path, 100:0. If the player wins with most units remaining, then adjust the AI blend towards the dispassionate&smart in their next match. If they win with just a few units remaining, leave it alone. If they lose, adjust it towards emotional&stupid. of course, that should only be a default adjustment. I say always let players override settings because they know better on what is fun.
This same philosophy could be used in 1v1 games too when they use something like health points and if the gameplay includes a lot of tactical variety. In this case, instead of # of units remaining you look at the health remaining. |
In response to Foomer
|
|
I very much like a configurable AI. Sometimes I just want to beat the AI down. Other times, I want to see how hard an opponent I can play.
In addition to difficulty, it is nice to be able to tweak things like aggression and consistency. Or select to have them set randomly! |
I suppose the Computer AI would technicly be cheating since it knows where everyone is but I have made other A.I's.
The idea of borrowing human intelligence is something I have never thought about, it sounds very intriguing and (as long as the player wasn't an idiot) workable.
An AI guild would be nice but I would only be able to join when I get my membership :(