🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

AITL?

Started by
13 comments, last by Shannon Barber 22 years ago
Has anyone ever run across an AI template library?
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Advertisement
I suppose you could tweak the boost graph library to generate neural-network functors.

Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
quote: Original post by Magmai Kai Holmlor
Has anyone ever run across an AI template library?


About the closest I''ve seen (and I haven''t really looked very hard) is OpenAI.

Timkin
quote: Original post by Fruny
I suppose you could tweak the boost graph library to generate neural-network functors.

That thought occured to me, and then I thought that it may have occured to someone else before me with more motivation

[qupte]Timkin
About the closest I''ve seen (and I haven''t really looked very hard) is OpenAI.

ewwww... though it appreas that''s about all that''s out there.

Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

[Look for information | GDNet Start Here | GDNet Search Tool | GDNet FAQ | MSDN RTF[L] | SGI STL Docs | STFW | Asking Smart Questions ]

[Free C++ Libraries | Boost | ACE | Loki | MTL | Blitz++ | wxWindows| xBNF]
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
Not sure if this is what you mean, but if you're into Genetic Algorithms check out GALib.

-Kirk

http://lancet.mit.edu/ga/

[edited by - KirkD on June 16, 2002 9:25:21 AM]
hehe, generic not genetic - as in a library of C++ templates to perform various AI task, and inject user code to tailor them to fit.

Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

[Look for information | GDNet Start Here | GDNet Search Tool | GDNet FAQ | MSDN RTF[L] | SGI STL Docs | STFW | Asking Smart Questions ]

[Free C++ Libraries | Boost | ACE | Loki | MTL | Blitz++ | wxWindows| Spriit(xBNF)]
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
I think there''s a lot of potential for generic templated AI. How many times must a particular algorithm be implemented before someone should make a library out of it?

Eventually, implementing path finding or neural networks should be a simple matter of calling a class member function, and most programmers won''t know the implementation details. Like for Singletons. Nowadays, you don''t really have to know how Loki or Boost ensure that there is only one instance of a Singleton to use it. It has been successfully abstracted. The same thing should be done with AI.

Cédric
Yep, I realize generic vs. genetic...

GALib is generic with respect to GAs. It is highly templated and very easy to use. If GAs are an option (perhaps to evolve a worthy opponent following a rule based AI system), I'd give GALib a try.

-Kirk

[edited by - KirkD on June 17, 2002 5:42:10 PM]
quote: Original post by cedricl
Eventually, implementing path finding or neural networks should be a simple matter of calling a class member function, and most programmers won''t know the implementation details.


Certainly you could implement a template class for such algorithms, however the problem boils down to should you! Would a template library neural network be as efficient as one tailored to the environment? If you have to do a lot of tailoring, how much use is the template library in the first place? These are the sorts of questions that need to be answered before someone makes an industry standard library.

Here''s a simple scenario to consider: computing a path cost for search.

Do you:

a) provide a domain specific callback function and register that with the library; or,

b) provide a domain model (and an interface format) to the library within which it computes its cost; or,

c) something else?

Clearly a) is easier to implement than b), however b) is likely to be more efficient as the search algorithm can work directly with the domain model, rather than having to make enquiries of an external function.

I''m not, however, suggesting that we shouldn''t look toward an AITL. Taking away the grunt work from designing game AI provides more time to look at higher level, more interesting designs for game AI.

Cheers,

Timkin
quote: Original post by Timkin
Here's a simple scenario to consider: computing a path cost for search.

Do you:

a) provide a domain specific callback function and register that with the library; or,

b) provide a domain model (and an interface format) to the library within which it computes its cost; or,

c) something else?

I think that's a great argument in favor of an AI template library. Policy-based design can provide a lot of flexibility, at little or no run-time costs. In all honesty, I've read and practiced a lot more with templates than I have with AI, so I may not have sufficient experience to say if it's really worth or not. However, as you have mentionned, a library takes away from some of the grunt work, and one of the great advantages of policy-based design is the ability to write your own policies, so that if optimization is needed, it can be done.

Besides, a lot of games have really poor AI that could definitely benefit from any library that is even remotely efficient. Some games don't even feature computer-controlled bots in multiplayer matches!

EDIT Note:
Templated callback function are as efficient as regular functions:
template< int (*func)() >void f(){   int x = (*func)();}f< mycallback >();    

With a good compiler, mycallback() could even be inlined in f()!

God, I love templates

Cédric


[edited by - cedricl on June 17, 2002 9:36:49 PM]

This topic is closed to new replies.

Advertisement