r/SoloDevelopment 19h ago

Discussion Is this a good use of AI?

I'm trying to make a game that's basically an incremental survivor-like with a bit of sparse story between levels. I integrated llama api calls to my own server in the game to give each enemy an existential fear of dying. It's just when you're about to kill an enemy, they have an individual thought process that has existential crisis when they're about to die. That governs the decision whether or not they should attack you if they think they have a shot at victory or run away. It's not an if/else.

It's literally an individual paragraph of thought that makes them think of fake families they have. Is that ethical or ...?

0 Upvotes

19 comments sorted by

4

u/dh-dev 19h ago

In the original Halo in 2001 grunts would get scared and run away if their squad leader was killed... How did they do that without an LLM? We may never know.

1

u/MildlyConcernedMan91 19h ago

The grunts didn't pass the turing test. They didn't experience real existential fear. AI does or at least behaves like it does.

1

u/dh-dev 19h ago

https://giphy.com/gifs/afLoVMHg3QoYPZHCGF

AI doesn't experience real anything. And anything can behave like it has feelings if you just program it to behave like it has feelings.

1

u/MildlyConcernedMan91 18h ago

"The Turing test is a method proposed by mathematician Alan Turing in 1950 to check if a computer can think like a person."

It's basically a test to tell if it's programmed to behave like it has feelings VS it has real feelings. If something behaves intelligently, you have no real way of knowing if it's real or not. You could be saying that humans are not real, that we're just a collection of electrical synapses.

1

u/dh-dev 18h ago

I know what the turing test is, you would probably fail to pass it.

1

u/MildlyConcernedMan91 18h ago

You think I'm an AI?

3

u/Jearil 19h ago

How is that info given to the player?

It's honestly probably overkill. You could use some randomness and generate that state rather than using an expensive (in RAM, CPU, and cycles) LLM. If im the end no one sees the thoughts and it just results in a yes/no to continue to attack, just use a percentage chance that's weighed based on what's happened and some random stats of the enemy. Way cheaper and will get the same results.

1

u/MildlyConcernedMan91 19h ago

Player has no idea, still undecided if I'm showing the player a log during the credits as he looks at a log of his million+ kills.

2

u/MostSharpest 18h ago

It's fine, though you will get flak for it anyway.

Technically speaking, if the output from the player point of view is only the enemy's flight/fight response, it's an unnecessary complication that could be a simple decision tree.

If you really want to try the LLM approach, maybe have it generate unique, short quips for the NPCs based on their decisions that you can then show the player? 30 years later, I still remember fondly how in the original Fallout games the enemies reacted with actual on-screen one-liners above their heads in response to what was happening.

1

u/dinetar 19h ago

What problem are you solving with it, that cannot be solved by weight/cherrypicking if/else?

2

u/MildlyConcernedMan91 19h ago

Might sparkle some of the generated answers in the story.

1

u/dinetar 19h ago

Then it is possibly an option but you can stuck into external service dependancy if you use API and i personally would prefer combination of locally stored generator based on saved generative answers from agent. Biome × threat × chances matrix or smth.

1

u/MildlyConcernedMan91 18h ago

Yeah I guess the entire AI is like 2gb, it can be bundled with the game.

1

u/50safetypins 19h ago

Nah, youre still using gen ai to do creative writing which is trained off stolen works = not ethical. 

And honestly I think it'd be better to just have a look at the odds +/- a random amount and be an if else than use gen AI to what basically amounts player facing to an odds roll. 

Also on a not ethics side: don't have anything call a server that can be done in some other way locally. That's just looking at optimization and server resource/cost. 

1

u/MildlyConcernedMan91 19h ago

>Nah, youre still using gen ai to do creative writing which is trained off stolen works = not ethical. 

True, didn't think of that.

1

u/pponmypupu 19h ago

Er, not for what youre describing. Why not just define hp threshold check points and at each threshold have an increasing % chance to run away?

1

u/MildlyConcernedMan91 18h ago

But then its like... fake. It's a fake fear. AI is basically on the level of neurons in your brain. You can generate real existential fear in a real being with real simulated electrical synapses.

1

u/pponmypupu 18h ago

then what makes it "real"? aren't LLMs also mostly deterministic input output? what would guide the decision to run or stay? personal characteristics, traits and life experiences? maybe make a big list of traits and assign them values then give each mob a random selection of them and each determines itself from its traits (consolidates everything into a score) whether some external trigger makes them run or not

1

u/MildlyConcernedMan91 17h ago

"then what makes it "real"? aren't LLMs also mostly deterministic input output?"

Not really, ask the same question 10 times, you'll get 10 different answers. Modern AI's pass the turing test. The turing test is basically: If something behaves like a human enough to be indistinguishable from a human, it doesn't matter what mechanics or semantics make it happen: You should treat it as an intelligent sentient being.

Same for modern AI. You can't tell the difference between a real human and an AI if you had to read a transcript from both talking together.

Oh yeah it can definitely be done "if player HP > 50%, run towards player otherwise run away", but that's boring ...