.com.unity Forums
  The Official e-Store of Shrapnel Games

This Month's Specials

Raging Tiger- Save $9.00
winSPMBT: Main Battle Tank- Save $5.00

   







Go Back   .com.unity Forums > Shrapnel Community > Space Empires: IV & V

Reply
 
Thread Tools Display Modes
  #1  
Old December 21st, 2000, 03:32 AM

Courageous Courageous is offline
Corporal
 
Join Date: Dec 2000
Location: San Diego, Ca, USA
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Courageous is on a distinguished road
Default Re: Wanted: Cheating AI

"I was referring the AI that uses that cheating extensively in order to cover up bad design behind it".
---
The best way of putting it might be to say that "cheating AI" is often used to mask the fact that a legitimate non-cheating solution to the problem was not known by the programmer. This leaves open a wide variety of explanations, some of them being that they are "lazy" or "bad designers," but many of them being simply that the problem was really, really hard -- or that there weren't enough programmers on the team -- or that there just wasn't enough of a budget -- or that some marketing guy redirected the programmers from AI to eye candy.

C//
Reply With Quote
  #2  
Old December 21st, 2000, 03:40 AM

Courageous Courageous is offline
Corporal
 
Join Date: Dec 2000
Location: San Diego, Ca, USA
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Courageous is on a distinguished road
Default Re: Wanted: Cheating AI

"But given that, I'd say that #'s 4 and 6 shouldn't be considered AI cheating - if the data is available or can be derived, the AI can and *should* make use of it. "
---
I personally believe you have chosen the best two ways for an AI to "cheat". In the game Imperialism II, I believe that they make use of both of these strategies and disguise them quite well. It's worthy of note that Imperialism II has to be one of the most difficult strategy games of all time. That game will bust your ***.

Note that #6 isn't an all-or-nothing affair. One can give an AI more information than it ought to have, but do it sparingly enough so that it doesn't look like it has perfect information.

Personally I don't find AI's which cheat over information to be offensive at all. That's just my opinion, though.

C//
Reply With Quote
  #3  
Old December 21st, 2000, 04:56 AM
LintMan's Avatar

LintMan LintMan is offline
Sergeant
 
Join Date: Oct 2000
Posts: 295
Thanks: 0
Thanked 0 Times in 0 Posts
LintMan is on a distinguished road
Default Re: Wanted: Cheating AI

quote:
Originally posted by Courageous:
Personally I don't find AI's which cheat over information to be offensive at all. That's just my opinion, though.



For me, it depends a lot on what information it is the AI is being given... If it always knows the positions of all your ships, then stealth tech is useless, which would be a big disappointment in a game like SEIV which has lots of stealth tech. On the other hand, if it always knew my resource/research/intel amounts, I wouldn't mind much.
Reply With Quote
  #4  
Old December 21st, 2000, 05:43 AM

Courageous Courageous is offline
Corporal
 
Join Date: Dec 2000
Location: San Diego, Ca, USA
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Courageous is on a distinguished road
Default Re: Wanted: Cheating AI

Sure, I can see that. Suppose that you had a game with both stealth and limited range sensor technology. Then suppose that there was some small probabibility each turn that the AI would "correctly guess" where to search for you with sensor ships, based on some probabilities. While this is obviously cheating, from our perspective, it can easily justified (within reason) that you are SIMULATING the human ability to make good guesses. Such an implementation might not even be obvious to the player, actually.

C//
Reply With Quote
  #5  
Old December 21st, 2000, 08:33 AM
LintMan's Avatar

LintMan LintMan is offline
Sergeant
 
Join Date: Oct 2000
Posts: 295
Thanks: 0
Thanked 0 Times in 0 Posts
LintMan is on a distinguished road
Default Re: Wanted: Cheating AI

quote:
Originally posted by Daynarr:

1) What methods are used to determine AI behavior in certain situations other than scripting?
2) I know that in chess AI uses its ability to process huge amount of information to decide its next move (the decision is based on points), so in that way it makes up for luck of human thinking ability (experience been one of them). I would like to know if that method used in chess programs only, or some designers use it for their projects too?




I'm not an expert on this stuff, but I did a bit of graduate coursework on AI and neural networks in the (sadly) increasingly distant past, and I'm in the mood to discuss AI stuff so I'll give the answers a go.

1) I would guess in a game like SEIV, much of the core AI behavior would be coded into the game. So you might have a primary AI routine called DoAITurn() which then calls subroutines to do all the steps the AI might take during its turn. These steps might be similar to what you would do on your turn, like responding to political Messages, scanning your systems for enemy incursions, moving your exploraction ships around, modifying your build and research queues, etc. Each of those steps could be a subroutine written to analyze the available data and decide what to do.

How does it decide what to do in those subroutines? Well, that's the tricky part. With scripting, the behavior is determined by the current state variables (ie: at war, exploring, etc) and what's in the script. So when building ships, it uses the ship building script to decide what ships to build. If you didn't want to use scripting, you might instead write a routine that examined an enemy's known designs, observed/spied out tech levels, and actual fleets and used that information to direct research and ship design to most effectively fight that enemy. For example, if the enemy seemed to have primarily missile ships, the AI might emphasize point defense research and place extra pdc's on its designs. Or if an enemy was using Allegiance Subverters, the AI might go for Master Computers. This type of decision making could make for a much more flexible AI opponent, but it is much harder to do, since so many more variables and special situations must be taken into account. This type of "If X and if Y, the do Z" would probably be called an "expert system", and in a sense, it is like a script, but with more conditional behavior control.

Other things an AI could do might be for it to do a cost-benefit analysis of weapons to decide which it wants to research. Potentially, a script could already take that sort of analysis into account, but your AI could be written to dynamically do it based upon its current needs. (In SEIV, this wouldn't be that beneficial, since Phased Polaron beams seem to be the optimal choice for beam weapons in nearly all situations).

Another decision making method used by AIs sometimes is randomness. Say the AI meets a race for the first time - Should the AI's ship immediately attack that race's undefended colony? A hostile AI race could be set to a 75% chance of doing so, while a less hostile one might only be 25% likely to do so. Certainly you'd hope such decisions were made in a more informed manner, but for smaller decisions, randomness can keep the game more varied.

There's all sorts of other possibilities for what the AI can do, but that's a few anyway.

2) The main power of chess-type AI's is that they use their computing power to essentially "look into the future" to see the results of the moves they are considering to make. So basically, for some or all of its potential moves, it guesses what it's opponent's best counter-moves to those moves would be, then it picks its best moves in response to those, and then the opponent's, etc. Each level of forward-looking is called a "ply". Picture a tree with, say, 20 branches on the trunk, and each branch having then having 20 sub-branches, and each sub-branch having 30 sub-sub-branches, etc. As it moves into future turns (moves up a branch level), if it sees the situation turn bad, it rejects that move and looks for an alternate one (thus "pruning" that branch and following a different one). Once it has picked out what it thinks is its best move, it may then analyze that one move a few plys further along to try to make sure there was't bad news lurking over its horizon.

As you can see, in a game like chess, the number of possible branches can quickly become impossible huge after even a small number of plys, so some tricks are done to thin the number of branches to analyze out, such as by not analyzing all possible moves, but only the ones it deems best. Another way to thin the branches is that chess AI's are also scripted, in a way. They usually have "opening libraries" and "closing libraries" that basically let the AI recognize tried-and-true beginning and end game situations and know the optimal responses to them.

This kind of forward-looking AI can be very effective, and in certain simple types of games, it can be "perfect" - in other words, it is able to analyze all possible moves so that in a "fair" game, it can guarantee a victory or at least a tie. A tic-tac-toe AI could be perfect in this manner. (Perhaps even a checkers one - I'm not sure about that, though).

For a vastly more complex game like SEIV, though, it is pretty much impossible to do this sort of forward-looking in any kind of effective way to make it practical for an AI to use that approach.

Well, I hope that all made sense and was of some interest to someone! :-)
Reply With Quote
  #6  
Old December 22nd, 2000, 02:31 AM
Daynarr's Avatar

Daynarr Daynarr is offline
Lieutenant General
 
Join Date: Dec 2000
Posts: 2,555
Thanks: 5
Thanked 3 Times in 3 Posts
Daynarr is on a distinguished road
Default Re: Wanted: Cheating AI

Thanks LintMan. This is interesting stuff and I am sure lots of people who read it will better understand how AI works.

[This message has been edited by Daynarr (edited 22 December 2000).]
Reply With Quote
  #7  
Old December 22nd, 2000, 09:35 AM

Courageous Courageous is offline
Corporal
 
Join Date: Dec 2000
Location: San Diego, Ca, USA
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Courageous is on a distinguished road
Default Re: Wanted: Cheating AI

This may surprise you, but the field of "aritificial intelligence" is perhaps the most misnamed field in all of computer science. Most of the time, classical AI is about "search" algorithms of various kinds. Some game "AI" (sic) programmers are well-versed in this subject matter, but many are not. It's genuinely difficult stuff, generally only studied in detail in graduate school. Few game programmers ever made it that far, so often they use templatized distillations of the various algorithms, pathfinding being the most common one.

To get a glimmer of how difficult it might be to write game AI, ask yourself -- as a player -- which warp points do I have to defend to defend my entire empire? As a human, you can answer in a split second -- in fact it is likely that your expansion policy is based on keeping the number of entry points to your empire few in order to create the highest concentrations of defensive forces at those entry points.

This is a trivial task that you've done in a dozen similar games. And you know what? It's hard. Really hard.

C//
Reply With Quote
Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 07:41 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.