Archived

This topic is now archived and is closed to further replies.

AI library?

This topic is 5706 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know of some free AI libraries (I don''t even know if something like this would make sense) for games programming? I''ve never tried to program an AI but it seems it would be very specialized based on your specific task. But it also seems that there are a lot of functions (like pathfinding) that are generic enough that there might be pre-existing libraries for them (which would be way better than any I could code, for sure). Thanks for the input! Panayoti

Share this post


Link to post
Share on other sites
Ah, yes...

What you ask for is the "holy grail" as far as game AI is concerned. This has been discussed at many a GDC roundtable.

There are companies that would like to make a living developing this kind of project, but finding the right set of problems to solve in the library is the key. Most game AI is so hopelessly entwined in the specific game that it cannot be discussed as a separate entity.

Anyone else want to give an opinion?

Bob

Share this post


Link to post
Share on other sites
I would have to agree with the ''holy grail'' assessment. Just about every Ai algorithm (except for something like neural nets, which there are libraries for) is very dependent on the game environment. Even path finding is usually specialized to certain factors found only in the program they are in.

Share this post


Link to post
Share on other sites
So, to assemble some sort of decent AI for a game, where would you recommend an AI newbie start? (for discussion sake, let''s say a 3d space sim or, if that''s too complicated, how about a 3d fighting game).

Thanks again,

P

Share this post


Link to post
Share on other sites
well, it would all depend on what you want your NPCs to do. i would suggest looking into fixed state machine (google it or do a search in this forum or goto ai-depot.com). they are pretty easy to understand - pretty much just switch statements with pre-defined, hard-coded behaviors.

beyond that i''d list out the things you specifically want your NPCs to do. break those things down into logical behaviors like "if the player does this -> i do this". or break it down into stimulous - response categories "if this and this and this happens i should do this". once you start breaking it down that way it should be pretty straight forward to figure out how to get at least some basic intelligence working.

pathfinding is definitely more challenging esp in a 3D environment but ai-depot.com has some great tuts. also i think there are some good articles in the Articles & Resources section of this site.

as long as you start out basic it''s not really that difficult.

-me

Share this post


Link to post
Share on other sites
Personally, I don''t see why it is so game-dependent... at least not in terms of ''standard'' AI. Genetic algorithms, neural networks, state-space searching/pathfinding, fuzzy logic... all these things lend themselves to a simple library where you just derive a new child class or add some callbacks to customise the design. Something like a finite state machine is perhaps not so beneficial to model in a library - not because it''s difficult to do generically, but because it''s so trivial to implement.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files ]

Share this post


Link to post
Share on other sites
Kylotan makes good points.

The other thing to consider is this... put the chicken before the egg... if there were a standard library available that did the job efficiently, more and more professional developers would use it and the interface would/may become a standard. Mainly because it cuts down production time/testing time on their own code. Middleware for AI makes a lot of sense, particularly for the low level ''grunt'' tasks of AI programming: pathfinding, scripting engines, FSMs, etc. If these tasks take only a small fraction of the development time then more time is available to creating more interesting higher level AI. The AI Software Engineer then gets more time to work with the game designers and spends less time working with the coders in the trenches, resulting in better games (IMHO).

Just another two cents worth (sheesh, so that''s why my bank balance is low!!!)

Timkin

Share this post


Link to post
Share on other sites
Well, it appears that we have people who think something like this *should* exist and people who think it *cannot* exist.

*sigh*

I''m inclined to think at least the low-level stuff should exist, but I have yet to find/see any de facto AI libraries. Mind you, I haven''t *really* been looking.

What I was thinking of is probably something similar to the ODE library which will do a lot of physics calculations for you.

*shrugs*

Thanks for all the input so far,

P

Share this post


Link to post
Share on other sites
quote:
Original post by Panayoti
Well, it appears that we have people who think something like this *should* exist and people who think it *cannot* exist.

*sigh*

I''m inclined to think at least the low-level stuff should exist, but I have yet to find/see any de facto AI libraries. Mind you, I haven''t *really* been looking.

What I was thinking of is probably something similar to the ODE library which will do a lot of physics calculations for you.

*shrugs*

Thanks for all the input so far,

P


If you are interested in the discussion on standards in AI interfaces, here is a link to a
round table I participated in at GDC 2002. Its the closest thing to a formal attempt to
determine standards that could be usefull to achieving these libraries.

http://www.ai-center.com/extern/gameaisig/gdc-2002-roundtable.html

Eric

Share this post


Link to post
Share on other sites
quote:
Original post by Panayoti
Does anyone know of some free AI libraries (I don't even know if something like this would make sense) for games programming?

I've never tried to program an AI but it seems it would be very specialized based on your specific task. But it also seems that there are a lot of functions (like pathfinding) that are generic enough that there might be pre-existing libraries for them (which would be way better than any I could code, for sure).

Thanks for the input!

Panayoti


There are a number of products out right now that do in fact offer AI toolkits or SDKs to some extent, though in my experience they aren't yet mature enough to be of enormous use. I've got a list (surely not complete) over at GameAI.Com; click on the Toolkits and SDKs link at the bottom.

Here's a quick list of what's there:



  • AI Implant (used to be called ACE) is both a Maya plug-in and a standalone SDK out of Canada;


  • DirectIA is a neat FSM and rules-based middleware solution out of France;


  • GALib is a public-domain genetics-algorithm library that's well put together;


  • Logic Programming Associates has several tools that help with AI, including Flex , Agent , and Flint ;


  • LouderThanABomb has a neat Fuzzy State Machine toolkit named Spark! ;


  • Altor Systems has a tool named Nightfall that I just know nothing about;


  • PathEngine is an SDK by Thomas Young that focuses on the very narrow realm of pathfinding AI;


  • Mindlathe has a neat tool that I haven't had a chance to play with yet. Both they and AI.Implant were very big on the GDC floor in March, 2002.




Hope that helps. There are solutions...but as others have pointed out they may or may not be what you're looking for, or mature enough to help you.



Ferretman

ferretman@gameai.com
www.gameai.com
From the High, Cold, Snowy Mountains of Colorado



[edited by - Ferretman on June 4, 2002 12:02:12 AM]

[edited by - Ferretman on June 4, 2002 12:03:38 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Geta

If you are interested in the discussion on standards in AI interfaces, here is a link to a
round table I participated in at GDC 2002. Its the closest thing to a formal attempt to
determine standards that could be usefull to achieving these libraries.

http://www.ai-center.com/extern/gameaisig/gdc-2002-roundtable.html

Eric



As Eric says this was a good roundtable (I was also lucky enough to be there), but I thought it highlighted one of the most significant things impeding the development of a standardized AI interface.

Towards the end of the roundtable we tried to come up with a simple sample definition of "a path", something that a pathfinder algorithm or library might return. We immediately got bogged down in what we actually meant when we said "a path". Was it



  • An array of waypoints identifying where a unit should move from frame to frame? second to second? update to update?


  • A list of velocity vectors, magnitudes, and times a unit might use to move? In what units?


  • A simple structure containing the direction and velocity to "move next", and a time at which the unit should check in with the pathfinder again?




Etc., etc. We didn''t even get in to whether or not the pathfinder should handle terrain or leave that to the unit, tactical pathfinding in which you''re trying to hide or balance hiding with speed, etc.

There are a lot of utterly valid ways to build a path, and modifying your personal pathfinder to meet the needs of the particular game you''re working on is one way to gain back CPU.

It struck me that until we can even agree on the definition of the problem, we''re going to have a hard time developing a standardized interface. Perhaps AI hardware, should it ever become available, will help matters in a de-facto manner (similar to Direct3D) if enough developers use it.




Ferretman

ferretman@gameai.com
www.gameai.com
From the High, Cold, Snowy Mountains of Colorado

Share this post


Link to post
Share on other sites
quote:
Original post by Timkin
Kylotan makes good points.

The other thing to consider is this... put the chicken before the egg... if there were a standard library available that did the job efficiently, more and more professional developers would use it and the interface would/may become a standard. Mainly because it cuts down production time/testing time on their own code. Middleware for AI makes a lot of sense, particularly for the low level ''grunt'' tasks of AI programming: pathfinding, scripting engines, FSMs, etc. If these tasks take only a small fraction of the development time then more time is available to creating more interesting higher level AI. The AI Software Engineer then gets more time to work with the game designers and spends less time working with the coders in the trenches, resulting in better games (IMHO).

Just another two cents worth (sheesh, so that''s why my bank balance is low!!!)

Timkin


A good point. That''s basically how Direct3D got popular and it may take exactly this kind of thing for any kind of AI middleware to catch on. The problem is that they''ve got to prove their worth first, and that will take time. Physics middleware has led the way somewhat, but that''s also a nasty problem filled with equations and calculus--few developers like that stuff!




Ferretman

ferretman@gameai.com
www.gameai.com
From the High, Cold, Snowy Mountains of Colorado

Share this post


Link to post
Share on other sites