🎉 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
quote: Original post by Timkin
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?

The STL has policies (allocators, comparison predicates, etc); why not do the same for an "AITL"? One could even specialize the template for particular types - effectively using the template library as a unified "scaffolding" (and promoting knowledge sharing by providing a common code base).

Ergo, why shouldn''t you?
Advertisement
quote: Original post by cedricl
EDIT Note:
Templated callback function are as efficient as regular functions:
template< int (*func)() >void f(){   int x = (*func)();}f< mycallback >();     

In C++, we prefer functors (objects with operator () defined) over "callbacks".
Not when there''s multiple points of callbacks - the STL prefers a single overloaded operator(); but the BGL (Boost Graph Library), for instance, uses multiple (named) callback functions in its so-called algorithm visitors (as opposed to functors). So instead of just operator(T), you have:
discover_vertex(Vertex u, const Graph&)
finish_vertex(Vertex u, const Graph&)
discover_edge(Edge v, const Graph&)
etc...
It''s the GoF Template Method, except it''s implemented using functor like callbacks, instead of virtual functions. (Trade run-time flexibility for speed).

Once you have a graph library in hand, an AI template library seems like the next step to me - alas I have insufficient AI expertise to design such a library. If there''s interest on the board, I''ll open a sourceforge project for the idea, and I can provide template design advice and testing. (I know the basics about AI, neural nets, state-machines, fuzzy logic, genetic algorithms, decision trees, etc... but have little experience implementing them and solving problems with them).


quote:
Ergo, why shouldn''t you?

It''s a massive undertaking that requires working practical and theoretical knowledge of AI algorithms and you need to grok C++ template programming. And there''s virtually no reward, except the acknowledgement for seeding the existence of the peer-reviewed, open-source, Artificial Intelligence Template Library; currently a void in the template library maelstrom
- 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
MKH:
Thanks for the heads up on multiple points of callbacks.

quote: Original post by Magmai Kai Holmlor
It''s a massive undertaking that requires working practical and theoretical knowledge of AI algorithms and you need to grok C++ template programming. And there''s virtually no reward, except the acknowledgement for seeding the existence of the peer-reviewed, open-source, Artificial Intelligence Template Library; currently a void in the template library maelstrom

Precisely.
I do know of at least one market leading middleware company that is looking at AI middleware, although I cannot disclose their name. It is certainly a ''hot potato'' in the industry and I would very much like to see it done WELL! Give it 5 years and I think that there will be several good products on the market. However, like graphics middleware, you really need to have some sort of understanding as to what is going on inside the thing before you apply it to a problem (lest you fall into the trap of using the wrong tool for the task and getting a crappy result). This will always be a stumbling block for getting people to use new techniques that they don''t understand (and for which the guts are hidden in a 3rd party library)!

Certainly, I''m an AI person and not a hard core programmer. I certainly don''t have a lot of exposure to templating; I''ve only written 1 reasonable templated class heirarchy (for my classifier systems) and I''m certain it wasn''t done well (since it was a learn as you go affair!).

As MKH points out... either you need a dedicated group of experts with a wide range of skills, plenty of enthusiasm and free time to spare... or a company prepared to pay said group of experts.

Cheers,

Timkin

This topic is closed to new replies.

Advertisement