Live data from Hacker News

AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library

github.com

11–20 of 57 posts

Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library

#12
Context: Spent most of my C-ish experience on Objective-C

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.

Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library

#13
post #7

Author here, feel free to ask any question :)

How is this different from https://github.com/AkshitIreddy/Interactive-LLM-Powered-NPCs ?

It's not an LLM. It's just Finite State Machines, Behavior Trees, Utility AI and Goal Oriented Action Planning.

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.

Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library

#14

Context: Spent most of my C-ish experience on Objective-C 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.

The "header-only" is actually accidental.

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.

Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library

#16
post #9

Earlier quoted context omitted.

Conventional game AI is usually search algorithms for movement (like A*) + finite state machines for behavior. No network calls to LLMs, no machine learning, etc. At the fringes, throw in the odd markov chain for procedural text generation. Basically AI post 2019 usually means LLM, and they're making the distinction that this is not that.

Yup, conventional game AI is just bunch of ifs :)

if rule(mean(training_data, weightings)): ...

isnt so different than

if rule(programmer_params): ...

Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library

#17
post #9

Earlier quoted context omitted.

Yup, conventional game AI is just bunch of ifs :)

if rule(mean(training_data, weightings)): ... isnt so different than if rule(programmer_params): ...

Depends. Conceptually there is no difference between a few ifs and a few billion ifs, in practice it's a whole different ballgame.

Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library

#19

Earlier quoted context omitted.

if rule(mean(training_data, weightings)): ... isnt so different than if rule(programmer_params): ...

Depends. Conceptually there is no difference between a few ifs and a few billion ifs, in practice it's a whole different ballgame.

This is very true

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.

Re: AI Toolkit: Give a brain to your game's NPCs, a header-only C++ library

#20
post #7

Author here, feel free to ask any question :)

How is this different from https://github.com/AkshitIreddy/Interactive-LLM-Powered-NPCs ?

The number of emojis in that readme is ridiculous. It non-sarcastically makes me doubt the quality of the project. (although having the repo URL point to a LinkedIn page is probably worse)
Post reply on HN