Advertisement

What exactly is AI?

Started by March 29, 2007 08:33 AM
2 comments, last by Sneftel 17 years, 10 months ago
Or, to rephrase the question, pleae explain the dynamics of how (game-enemy-specific) artificial intelligence functions. I have been working on my first game recently, and I need to know how AI works in games in order to duplicate it. I have made a simple "follower" AI in a few QuickBASIC games in the past, but I am now accelerating into 3D game programming in C/C++, and the number of options for the player is much larger, not to mention the addition of a third dimension. So, would it be something like this? (P.S. - I'm using a server architecture system in the game I'm making.) [Retrieve current location/state data from server] | [Retrieve relative object location/state data from server] | [Calculate locations and options at AI client] | [Choose option with best probability at AI client] | [Send simulated input to server] | [Receive simulated input at server] | [Calculate new location/state data at server] | [Calculate relative object location/state data at server] | [Send new location/state data to AI client] | [Send relative object location/state data to AI client] Well? Am I far off in my assumptions?
There is no single clear definition of AI, nor a single standard way in which it's implemented in games.

I would also point out that almost none of your pseudocode directly relates to AI. That's all networking structural code. The AI is purely the "Choose option with best probability" bit.
Advertisement
[Calculate locations and options at AI client]
<--------- AI goes in here --------|
[Choose option with best probability at AI client]


AI, at least with reference to games, is that part of the code base that determines the mapping from inputs states to output actions for any element in the game that can affect the environment/game state (and that presumably has more than 1 option available to it at most times).

So, for example, if you're talking about AI for bots in an FPS, then the input is the locally perceived game state (or true game state if you're cheating) and the outputs cover the task domains of moving, shooting, performing tactical behaviours, etc.

Much of game AI is about applying the right tools to achieve the right behaviours, given your processing time budget. Hence, without knowing what it is your trying to achieve and what information you have available, there is really no way that we can offer any useful advice or information (other than to point you toward the multitude of literary reference covering game AI. Start in the articles and resources section of the website and also check out the book reviews.)

Cheers,

Timkin
Quote:
Original post by ShotgunNinja
What exactly is AI?
Nope, not in the slightest. [smile]
Quote:
Or, to rephrase the question, pleae explain the dynamics of how (game-enemy-specific) artificial intelligence functions.

A variety of well-known algorithms, seasoned liberally with clever hacks, outright cheating, and the willingness of the player to see intelligence where none exists.

Quote:

[Retrieve current location/state data from server]
|
[Retrieve relative object location/state data from server]
|
[Calculate locations and options at AI client]
|
[Choose option with best probability at AI client]
|
[Send simulated input to server]
|
[Receive simulated input at server]
|
[Calculate new location/state data at server]
|
[Calculate relative object location/state data at server]
|
[Send new location/state data to AI client]
|
[Send relative object location/state data to AI client]

It can. In order to enable the hacks and cheating I mentioned earlier, though, it's common to put AI directly on the server. It all depends on what sort of a game you're making. And your earlier questions seem to be subsumed into steps 4 and 5. Are you curious about AI, or about the role of NPCs in a player-character framework?

This topic is closed to new replies.

Advertisement