AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library
github.com
github.com
The language i'm using - Elixir - also has some very interesting features that make it easy to integrate async a.i planning + a.i to a.i group communication. Ahh, I find it so exciting. The main simulation loop is never blocked. Meanwhile the A.I planner just chugs along as a separate process, spawning and despawning new agents in the world, creating and merging control groups, and setting new goals.
My last project with Elixir was using Elixir merely as an orchestrator of static binaries (developed in golang) which were talking in JSON via stdin/stdout.
And yep Elixir is an amazing orchestrator. But when the time comes I'll gauge whether I can't get most of the benefits with async Rust.
FYI, GOAP was what made F.E.A.R such a cool game: https://www.youtube.com/watch?v=PaOLBOuyswI
Thanks for this. I loved the ai in that game. Very few games are as good without cheating even today.
It provides:
Finite State Machines
Behavior Tree
Utility AI
Goal Oriented Action Planning
All of these are "AI", but handcrafted ones.I'm not sure you can really design a well put together experience around a DL agent, but if you can, it might as well just be handcrafted with some of these abstractions anyway.
Because in the end, you essentially need high understanding/constraints of how it will behave otherwise you've lost control over the experience as the designer.
IANAPGD (I Am Not A Professional Game Dev), I haven't seen this as a gameplay mechanic either.
Basically AI post 2019 usually means LLM, and they're making the distinction that this is not that.
isnt so different than
if rule(programmer_params): ...
Code format for a 1 line like this example is nowhere close to # of lines in other files, the networking delays, and also can't be done client-side with current hardware to the scale needed for multiple entities all weighted uniquely in the current 2023 "AI" tools.
Both A* and deep learning explores a search space based on a goal. The difference is DL explores when it's training and learns to use the right moves for a given input.
It should be fairly obvious that what we think of as 'conventional AI' might have changed in the last 28 years, even if we hadn't just been living through a twelve month or so explosion in the availability and power of generative AI models that transformed what people associate the term with.
That book has the latest edition in 2020. But yeah, A* is search space based, LLMs or DL I wouldn't call it search space based at all. It's function fitting.
And if you're scaling difficulty, then you're likely tuning how the AI behaves.
GDC, GDCVault, academic papers, and dev blogs//post mortems of similar games to what you're interested in will have a lot of good information.
This should cover all you need to make an NPC a bit smarter (but it is still "scripted").
LLMs are not what you would use to make a bot in Civilization, or Age of Empires.
The generative AI/ML scene seems to be very meme-y, from that, to all of the anime related stuff, to Mistral releasing models as torrents with warez-scene style .nfos, etc.
Here's my potentially dumb question: what's the benefit of header-only libraries versus regular C/C++ code?
On top of that, the "Installation" instructions are just "copy the file in your project", no CMake, no Meson, not any kind of build system.
It is extremely clean and concise.
Feel free to open issues or discussions on the repository if you have any difficulty.
Unreal Engine uses C++. You have boost, SDL, Ogre3D, Irrlicht, EnTT, ImGui, etc... aka: C++ has a good ecosystem for gamedev.
The "Zero Cost Abstraction" philosophy of C++ makes it easier to squeeze out the performance you want.
Unity (and recently Godot 4) uses C# but they are still relatively young in the field. We were making games long before those :)
I would not say it's "THE" popular language, but it does have an history.
What is the advantage of header-only?
My mental model was headers ~= implementation as far as compiler is concerned, thus limiting the size of headers is a way to indicate API surface area and document.
It's all C++ template classes, which must be fully defined at their declaration site (so the header). When using the template, the compiler will generate the code needed by "instantiating the template" (for lack of a better word).
The other advantage is that it requires no build system to include in your project.