Since there seemed to be general interest in AI discussion...
In the previous discussion, Spuzzum mentioned something about AIs cheating by knowing the player location, etc.
My current opinion is that AI cheating is not an issue. If your goal is entertainment (as opposed to research on AI or something), then I think all implementation tricks are fair, and all that matters is player experience.
Players don't want the AI to act in ways they perceive as cheating...that is, if they can tell it's building things without the appropriate technologies, or that it's teleporting around the map on you, that's bad. But if the cheating allows the AI to act like an intelligent human without exposing the tricks, then that's an improvement to the player experience and is fair.
The Civ3 AI is pretty good. One way it cheats is to know how many units you have in your cities. This could be fine if the fact weren't exposed but it helped the AI play a more intelligent game. However, the trick is exposed, because the AI will land on your island, skip all the cities on the edge of the island, and go to the center of the island and attack the one city you forgot to put a defensive unit in.
This is bad because the AI is now not playing like a human...it's displaying god-like knowledge, which negatively impacts the player experience. But if they used the trick to give the AI subtle hints on where to attack (like, if there are 3 cities on the coast of an island, 50% of the time attack the one that is the weakest, and the other 50% attack the one closest to the AI), then it might make the AI tougher without making it seem in-human.
I consider the player gaming experience to be like reading a book or watching a movie...if it's a gritty realistic future spaceship movie (like Alien), then any trick the director can pull to make it feel like a gritty future spaceship is fair. It doesn't matter if the walls are styrofoam as long as the viewer can't tell. If the viewer gets sucked into the movie on the desired terms without noticing pieces of styrofoam hanging off the wall in the background, then the movie is a success. In the same vein, if the cheating makes the AI feel like a challenging human opponent without doing "impossible" things in the game, then the AI is a success.
Or so I think -- how about you?
1
2
ID:153639
Jul 15 2003, 1:42 pm
|
|
In response to SilkWizard
|
|
SilkWizard wrote:
I recently made a post on my DWO News page about the AI that I've programmed for that game (scroll down to July 13th). That A.I. cheats as well, as it knows exactly how powerful the enemy is, what spells they have, and also any weaknesses. Skynet sounds really nice. It meets something I've felt games should do more: Provide AI that *helps* the player, not just attacks them. I've probably posted before that the best moment of AI in my life was in Half-life, after joining up with the first Barney, we were walking along in a hallway. Suddenly the ceiling tiles break open and headcrabs go after me -- I'm still in shock, when *blam* *blam*, Barney kills the headcrabs for me. I loved that moment because I didn't expect it, and it was really like a buddy helping out in a tough moment. Your description of the mercenaries casing Revive on you after the battle is really great. I may actually have to play this game! On a related note, I think in Civ-style games AI diplomacy is too flaky. If an AI allies with you, that should be a real, serious thing you can get emotionally attached to. Not have them turn around and attack you 3 turns later for reasons you can't even perceive. If we have alliances in our next DDT game, I'm probably going to propose that an alliance is unbreakable and for the length of the game: That is, once you ally, you are working to win the game together, not to backstab each other at some point. As far as I see it, aside from making A.I. be able to think and learn for itself, a little bit of cheating isn't that bad. Exactly...since you can't (so far, anyway!) create a real intelligence, it's all a case of "cheating", it's just a question of how and how much, and what the purpose of the cheating is. |
The Civ3 AI is pretty good. One way it cheats is to know how many units you have in your cities. This could be fine if the fact weren't exposed but it helped the AI play a more intelligent game. However, the trick is exposed, because the AI will land on your island, skip all the cities on the edge of the island, and go to the center of the island and attack the one city you forgot to put a defensive unit in. Well wouldn't a player also expect there to be less defense on the inside of someones empire? Even though it might be cheating that would seem like the reasonable thing a player would also do unless it was infact just one city without defense. |
In response to Theodis
|
|
Theodis wrote:
Well wouldn't a player also expect there to be less defense on the inside of someones empire? Even though it might be cheating that would seem like the reasonable thing a player would also do unless it was infact just one city without defense. That's what I mean -- one city out of 20 without defense on an island, and the AI *always* finds that one? And it doesn't make tactical sense. You can't keep a city that you take in the center of someone else's influence. In fact, Civ3 even models this with cultural influence: The longer a city has been developing and the more it is surrounded by other cities in your empire, the more likely it is to revolt and the citizens will turn the city back to you. |
---------->
*Points at Crispy* My friend caught that Crispy was cheating AI in Yahtzee :P As long as people can't tell their cheating, I think it is a good thing. |
In response to Kunark
|
|
Kunark wrote:
My friend caught that Crispy was cheating AI in Yahtzee :P That's not cheating, it's a bug. =P It can happen to anyone, not just the AI. I played a game of Yahtzee with Maz a while ago, and he kept getting all these weird rolls, completely by accident. =) <font size=-3>"What? THAT'S a Full House?" "No..." "Weird." "Stop cheating, Maz! =P" "I can't, I don't know how I'm doing it... o_0"</font> As long as people can't tell their cheating, I think it is a good thing. Yep. They need to know information that a human player could get by guessing, or through logical deduction. That's only fair. But once they start knowing a lot more than that, it's possible to tell and it becomes unfair. Age of Mythology's AI is a great example of overcoming this, actually; the computer players remember everything they've seen via a "knowledge base". They scout regularly to update this knowledge base, so that it's actually useful; just like a good human player would do. When making decisions, the AI doesn't use the actual data about the game, but instead relies on its collected knowledge. Some RTS game AIs might go through a sequence like this: 1. More gold is needed. 2. *searches for a gold mine* Found one! (Even though it's never seen the gold mine, it knows it's there because it taps into the game data) 3. Sends a bunch of villagers there. Age of Mythology's AI would do something like this: 1. More gold is needed. 2. I don't know of any gold mines. 3. I know that new gold mines cannot be created, so there's no point looking for them where I've explored before. 4. I will send out a scout to search in the areas where I've never explored before. (It does so.) 5. When/if the scout finds a gold mine, I will claim it. If necessary, I will use military force to protect it from my enemies. At least, that's how I understand it. There's documentation about AI scripting which I looked through briefly. Anyway, the point of all that was to illustrate that AOM has a more "human" AI than many other games, in that it only knows what it finds out (and consequently is programmed to find out as much as it can, via constant scouting). This allows it to play well without cheating. It can cheat, depending on the AI script it's using, but it's set up so that it doesn't have to. If it does, I've never noticed, so it must be working! =) As long as it's undetectable, then the AI can cheat. Most cheating can be detected, though; even something as simple as checking to see if there are any gold mines left on the map will be picked up. Age of Empires II sometimes does this; if you have the only gold mines on the map behind your walls, and there's a gap in your fortifications, there will be a constant stream of villagers trying to get to it. Place a few bombard towers around the gap, and you have a villager massacre. They just keep coming. Until, that is, the gold mine is exhausted! And the advertising material insisted that the AI didn't cheat... =) |
In response to Crispy
|
|
Crispy wrote:
Kunark wrote: Hehe I see where your coming from... After making the hands for BYOND Poker, there were so many bugs... And are still a few. The cards vs. dice thing doesn't make much of a difference, except that with the cards there is also suite stuff for a few of the hands. I think I've at least eliminated all but one of the bugs, but I can't seem to get at this one last bug that I keep seeing with Straits. |
In response to Kunark
|
|
Detecting straights is really annoying, isn't it? =)
*rejoices now that he has someone to commiserate with* There are so many scoring bugs in Yahtzee that it's almost funny... actually, it's not. It's really annoying - it should work, it DOES work when I'm testing it, but I'm getting all these bug reports that make absolutely no sense and cannot be reproduced no matter how hard I try. =( |
In response to Crispy
|
|
If this is any help, I'll post you mine which is pretty much fool proof, except for that one bug I can't seem to pinpoint. I've found bugs with your straights and possibly your full houses, but thats it. On the full houses, I could have sworn I had one then it gave me a 0 because it said I didn't, but I never rechecked.
The straight detector is found at the beginning of the proc, so I put in the top to show what some of the things you will see in the proc are: var/list/MyCards = list() I hope this helps you improve your straights... Also if you or anyone sees a flaw in it, please tell me so I can fix it... It might just be the answer I need to fixing the phantom bug! My bug seems to happen when there is a small straight (4 cards in a straight) and then no 5th one, but a 6th one is there and it seems to do it (example: 3, 4, 5, 6, 8 would register as a straight for some reason... Though I am not sure if this is it.). StraightCardList and StraightList are used to find straight flushes after this. The basis of it is that it checks each card, and sees if it has 5 below it, or 5 above it. My bug might have to do with the ace = 1 and ace also = 11 thing that is with cards. The way I did my full houses is after it registered as a 3 of a kind, it checks all the other dice of different values than the 3 of a kind to see if they have a pair. |
In response to Deadron
|
|
Terra Dominus (yes, that's the strategy game I'm working on -- you're the one who inspired the name, if you remember) has treaties that are pretty unbreakable in that regard. The treaty system in Terra Dominus is done such that it has "clauses" (which you can manually specify), and at any time that you would cause a clause to be broken, you can either issue an explicit order to break the treaty (which damages civilian opinions of you in every nation across the globe -- assuming you get caught), or refuse to break the treaty.
The only way to dissolve a treaty is to get unanimous consent from all signing parties. Otherwise, the treaty remains intact, and all you can hope to do is breach the treaty. Because there are real consequences to breaking your word, it should be something that happens very rarely. If/when I do happen to implement Terra Dominus' AI, it would carefully measure the risks of having damaged reputation versus the benefits of breaking the treaty. The clause system, in my opinion, lends far more to gameplay than any hard-coded treaties could. Here's a sample treaty for a mutual nuclear disarmament: All nations must destroy all nuclear warheads within 30 turns. All nations must not construct any nuclear warheads. All nations must not research Nuclear Fission. This treaty will remain in effect indefinitely. ("All nations" means "all signing nations". No one is forced to sign a treaty (not by the engine, anyway).) |
Well, I'm a fundamental believer that the only way AI is going to get smarter is if it doesn't cheat.
For example, Counter-Strike bots really irritate me; the system they use to move and shoot involves the program calculating the exact angles required to shoot at the player (oftentimes, at the player's head). It then randomises the angles slightly to give the illusion of inaccuracy, then sets its crosshairs to that angle and pulls the trigger. The end result produces bots that are surprisingly realistic, but they fail in several regards: not only are they absolutely superior to humans when it comes to detecting targets that are mostly obscured and are standing still, but they can see in the dark. Furthermore, their accuracy randomness isn't significant enough at short range, and it causes them to be perfectly accurate at short range, whereas a human player at that range panics and shoots wildly in the general direction of a target. Likewise, at long range, the AI fails miserably, with even subtle variations in the angles causing substantial inaccuracy. Finally, the bots lack one further sense of realism -- they can turn at their maximum turn speed towards their adversary, then stop instantly with the crosshairs dead on their target. Most combat from human players generally involves the humans overshooting and undershooting the target, then correcting (or overcorrecting and undercorrecting) their crosshairs until they achieve a perfect aim. In the simplest terms, the bots are quite entertaining, and with proper waypoints and the like, they provide very realistic gameplay. The problem is, it's not actually realism, it's verisimilitude. The bots are designed to "fake" realism -- if the features that make them inaccurate and that restrict their turn speed and the like are taken off, then the bots get perfect shots every time. Now, I'd be lying if I said that I won't use bots because they don't provide a similar experience to playing against humans, because I actually refuse to play against humans in Counter-Strike -- when I play, I only play against bots on my LAN, and occasionally my brother joins the same team I'm on (mainly because he doesn't want me to massacre him if he's on the other team ;-)). (The reason I won't play against other humans, aside from my "don't want to upset other people" personality trait, is because I'm under the impression that testosterone-imbalanced pubescent jerks are rampant. Oh, and the cheating turns me away as well.) |
In response to Kunark
|
|
My straights code is much shorter and simpler than that. =) It works quite well, except for a random bug which I can never, EVER reproduce. >(
I do Full Houses by saying "if the longest of-a-kind is 3 of a kind, and the shortest of-a-kind is 2 of a kind, it's a Full House". It works in theory, it even works in practice whenever I test it, but it screws up in weird and random ways whenever I'm NOT testing it... |
In response to Deadron
|
|
Deadron wrote:
If we have alliances in our next DDT game, I'm probably going to propose that an alliance is unbreakable and for the length of the game: That is, once you ally, you are working to win the game together, not to backstab each other at some point. Yeah, but half of the point of a treaty is that it can be broken. The treaty is more about creating consiquencs for breaking it then following it blindly. I mean if I made a treaty with Deadronania that boiled down to neither of us are allowed to make nuclear missiles. Then suddenly Spuzzonia offered me a big juicy deal where I make nuclear missiles for them, and they give me the East Coast of Deadronania and protection from their Evil Empire. Im an evil guy, and its in my best interests, so yeah Id want to take them up on it. I think rather then making them unbreakable (Which falls into the godlike forces category), you simply make it unappealing to break them. Encourage players to take treaties really seriously. Although to do that youd have to encourage grudges and in character relationships, which would be hard. I cant see many people putting their best interests behind loyalty, or even their morals. Anyway thats getting really off topic. Back on the topic of AI I dont mind it as long as its not just a lazy shortcut. |
Well, once you reach a certain point you an't really make the A.I. much better without it cheating, so to make a game dificult sometimes it is neccessary. For instance, in shootemups, sometimes when you jack the difficulty up, baddies don't get smarter, they just know when you're round the corner.
|
In response to DarkView
|
|
DarkView wrote:
Deadron wrote: Making breaking treaties rare and filled with consequences is okay...the main problem is, in most strategy games you ally with an AI, give it money and units and all that and don't attack it, and 10 turns later it turns on you and attacks you because you are the most powerful player. This breaks believability and keeps you from being able to "feel" for a fellow AI player. While there certainly can be back-stabbing in real life, if you are weaker and the biggest power on the planet is being nice to yo and giving you stuff, normally you don't break treaties arbitrarily and suicidally. Me, if I ally with an AI, I want the feeling that we're in it together, at least for a good amount of time. I just experienced this with Rise of Nations in an interesting way (after playing the demo as suggested here I ended up buying it, and am enjoying exploring the game): The solo game is a Risk-like game where you are moving army units on a map of the world and deciding what territories to take over. An interesting aspect of this is that if you attack a territory that one of your allies is next to, your ally will join in the fight. To my surprise, this meant he set up a city, started building, and worked up attack forces to go after the enemy. We didn't do any explicit coordinating, but if I saw him attacking, I might attack a nearby city (since the enemy was pre-occupied), or join in his attack. We had a hard-fought battle across the land-scape, taking over each city with many losses until we ground the enemy down to his capital. This was great! This is what AI should be: Not just an enemy, but an ally. This would not have been nearly as enjoyable if my ally had simply turned around in the middle of the battle and started attacking me. That would mean I couldn't feel appreciative of an ally; I could only keep a wary eye out. Not only that, if I felt he could turn on me, I wouldn't deploy my forces to help him...instead I'd let him get killed and just do cleanup (in this case, then, we probably wouldn't have won the territory). Now, this is during a fight for a single territory. Back on the map, it's certainly possible that at some point we won't be allies anymore. But if that happens it will be between battles, not in the middle of them. |
Personally I think AI cheating is not only an acceptable thing, its a -NESSICARY- thing. Simply because of the fact that AI is -NOT- AI.
Its not intellegent. It cant make decisions the same way that people do, nor can it interpret the data coming from its sences to figure out what the oppoonent is doing, as we can. Additionally it cannot change its patterns because of these 2 things either. Cheating, however well its hidden, is a way to let the developer make the AI appear to be more complex then it really is, by giving it access to information or abilities that the human player doesnt have. Thats just my opinion tho ^^ Elorien |
In response to Elorien
|
|
AI can be complex enough, for most types of games to provide a realistic challenge for the player without cheating.(see the post about AOM for example) AI cheating is a problem when it's blantantly obvious cheating that the player can't help but notice. "Hmm, the AI seems to have build twice as many buildings as me. Hmm... there's his attack force coming through my unguarded backdoor that he would have have to have scouted all the way around the map to get back there." When it's obvious that the AI players have hard coded advantages like that they can build faster, have stronger units, or have more money, and it's obvious that they do, the cheating is bad.
|
In response to Deadron
|
|
It sounds great. It would be nice if the AI went into a battle (Or treaty) with premeditated plans. For example they go in as allies. Half way through turn on you, but its not just a random pick("Friend","Foe") situation, its the AI actually playing you for a fool.
Signing treaties and making alliences in order to get you into a position where you are vunerable, then attacking at your moment of weakness. I think the problem with a lot of AI's in strategy games is they are too black and white. They are either irrational or completely predictable. It only takes ten minutes to get inside most AI's heads. |
In response to Jon88
|
|
When it's obvious that the AI players have hard coded advantages like that they can build faster, have stronger units, or have more money, and it's obvious that they do, the cheating is bad. I think the worst was when I played Empire Earth against 7 computers on an islands map. I clear cut half the map of trees and somehow every one of the computers despite having trees left on thier islands with only a few people chopping lumber managed to double my lumber harvested! |
1
2
One of my favorite games of all time, Starcraft allows the A.I. to cheat quite a bit, as they start out with 10,000 minerals and gas.
I recently made a post on my DWO News page about the AI that I've programmed for that game (scroll down to July 13th). That A.I. cheats as well, as it knows exactly how powerful the enemy is, what spells they have, and also any weaknesses.
As far as I see it, aside from making A.I. be able to think and learn for itself, a little bit of cheating isn't that bad.