/r/gameai

Photograph via snooOG

Topics relating to the development and use of game AI. Note that this is often not real artificial intelligence but rather what has been referred to for decades as "AI" in games. Usually, that is variations on some form of artificial behavior.

And take that bucket off your head!

A subreddit for those interested in the development and research of artificial intelligence for games. For broader scope, check out /r/gamedev and /r/artificial.

Recommended Resources:

/r/gameai

7,190 Subscribers

0

Dune Theme, AI Game: From Reborn to Fall

This game contains six AI NPC as characters with image output, with a little kitty for you to interact with, auto response and three chapters in total, from choosing the lisan al gaib (chat based), defeat and take the throne (Select Adventure) to pass the golden age (card swipe form, Yes / No as in Reigns)

Game Intro:

  • See the chosen. See how they stand tall above us. See how they fall.

Link to the Game

https://rpggo.ai/game/35091d42-4303-42f9-9d2c-f62b5545fda2#/game?gameId=35091d42-4303-42f9-9d2c-f62b5545fda2

https://preview.redd.it/y2hap8wfqh8d1.png?width=1494&format=png&auto=webp&s=5acae4e0912b1213f842b3917572a738c815cb64

0 Comments
2024/06/24
09:45 UTC

2

Utility AI: Agents having multiple actions with the same behavior?

So I'm trying to implement utility AI using all the resources I can find on IAUS, and I've hit a snag while linking actions to behaviors.

Suppose I have an AI mech that can be loaded out with different weapons, components etc. Some actions are added to the mech when it's designed, such as BasicMeleeAttack -> Punch or ClosingMeleeAttack -> ShoulderCharge. However, maybe I also want to add another attack that uses ClosingMeleeAttack as its behavior, such as DashKick.

Or maybe the mech picks up an axe which also uses BasicMeleeAttack to the mech's equipment. If I want the mech to be able to either punch or swing the axe, I have to change punch's behavior to BasicUnarmedMeleeAttack, or have some way of choosing which action to perform for a given behavior + target.

The first solution I thought of was to choose a behavior and target, then pick from the available actions either randomly or via a priority assigned when designing the action (swinging axe is priority .8 while unarmed punch is .2). Not a fan of this.

The second solution is to evaluate each behavior, target, and action together. This unfortunately introduces coupling between the behavior (what to do), and the action (execution code). But this allows more context when evaluating behaviors, as maybe Punch doesn't have the range to hit the enemy whereas the axe does.

Finally, I could increase the granularity of behaviors to increase the number of actions available without introducing a one to many relationship. For instance, ClosingMeleeAttack -> ShoulderCharge and FlairClosingMeleeAttack -> DashKick.

My instinct is to go with solution 2, since it offers the most flexibility in situations where I want a character to have interesting actions available without forbidding the "default" action.

I'd appreciate hearing from anyone who has tackled this problem themselves!

1 Comment
2024/06/23
22:20 UTC

3

We created an AI-driven storytelling game "1001 Nights"(Demo and papers Available)

Game Trailer

Hi, my name is Uchan, and I'm the lead developer of 1001 Nights, a storytelling game driven by large language models (LLMs, like GPT-4. We used GLM for free demo)

1001 Nights is an RPG driven by language AI based on Persian folklore. The protagonist Shahrazad has the unique ability to transform language into reality. Your mission is to craft a compelling tale for the King, leading him to mention weapons, which then materialize into real blades in your hands to revenge on him

1001 Nights is a pre-GPT game, initially developed in 2020 before AI became widespread (driven by GPT-2, the precursor to ChatGPT). Due to the limitations of AI before 2023, this game was originally an art and academic project rather than an indie game. Over the past years, I published academic papers on the game system and received a nomination for the Berlin A.MAZE indie game awards.

We have provided a full AI content disclosure on our itch.io page, and most of our AI workflow has been disclosed and published in our papers (they are basically like dev logs in a special format). If you have any questions or feedback about the AI workflow, please leave us a message! We rarely see indie games with a detailed disclosure statement like ours, so we're not entirely sure how best to approach it. We would greatly appreciate any suggestions you might have.

1001 Nights' free demo is now available. We also have a Steam page, but the demo is currently only on itch.io. This game is still in progress, and we'd love to hear your feedback.

Links:

2 Comments
2024/06/03
22:57 UTC

2

Algorithm for delivering N resources to a destination from multiple sources

Hi,

Various simulation games require carrying resources from various sources to a single destination, for example resources needed for crafting need to be delivered to a workshop from wherever these resources are currently lying around.

So imagine you have a single destination, and it needs N resources of some type. These resources are available in various sources on the map, and each source has a different amount of said resource, that ciykd be more or less than N. There are also various characters around the map in different positions that can be assigned the task of carrying resources towards the destination.

I'm looking for an algorithm that doesn't have to be optimal but needs to make sense to the player (so they don't say "the AI sucks") where one (or more) of the characters are assigned a route to collect resources from various nodes so that their total amount is N, and then deliver them to the destination. Any ideas?

Efficiency is a concern of course.

9 Comments
2024/05/22
05:52 UTC

6

Hi everyone! I've made a Utility AI plugin for Unity called Utility Intelligence. It's a user-friendly Utility AI Framework with an intuitive Editor for easily designing AIs in Unity. Any thoughts are welcome :D

4 Comments
2024/04/23
04:20 UTC

1

Smart Sense

I had a thought last night and maybe this isn’t the place for this post but I wanted to get the idea out.

What if there was an AI tool for video game players that helped you set your personal ideal sensitivity settings for individual games based on your movement patterns and performance?

So, an AI “watches” you play a few rounds of a game (probably something competitive) and analyzes that you almost always over correct vertically but not horizontally in your aiming movements. The program uses this information to run some numbers and spits out a suggestion for what sensitivity best fits your current skill level. Ideally it would be integrated into the game itself and would be able to make those changes in the game setting automatically.

I’m guessing this could then be expanded to help the players reach higher sense levels too with some kind of training regimen through continued gameplay analysis.

Is this something that would be doable in AI’s current form?

2 Comments
2024/04/15
12:19 UTC

2

Questions for AI development

Greetings. I am currently working on developing an AI for a strategy RPG game. The core gameplay loop is that the AI will either be tasked with capturing a castle or defending it from being taken by the player.

What I have designed so far is that I am using a scoring system to determine the best position , action and targets. The formula I use is

Position x Action x Consideration.

Position starts at 1.0 and increases/decreases depending if moving there is beneficial or not (terrain bonus) It also change depending on how close this unit is to the castle or to the enemy.

Action is what's the action is worth. Either damage an enemy, heal an ally, apply buffs to allies or apply debuffs to enemies.

Consideration also starts at 1.0 and changes depending on certain circumstances. For example, healing/attacking an army general adds a bonus of 0.5 than a regular unit, adding further 0.02 per level so it prioritize high-level units. Additional points are added depending if the Action is suited for Attack, Support, Debuffer, or Healer or if attacking this unit will kill it.

My questions are

Am I using the right formula for determining the points for an action? How do I determine how much an action is worth? What metrics can I use to justify attacking an enemy unit over using a support skill or healing an ally especially for unit that can have multiple roles?

Currently, I am basing it on damage done (maximizing damage). A saved test I have has an AI deciding to eliminate a normal unit over an army general. Both are already near death. Since this unit deals more damage on the normal unit, it always kill the normal one unless I tweak the consideration to higher than 0.5.

3 Comments
2024/04/01
13:17 UTC

3

A introduction to Game AI?

Hi all,

I notice that the recent posts here involve very specific items. But where does one START when looking into Game AI?

I'm an ex-software developer but I've never done any AI beyond Boids. I'd like to get started, but I don't know where to look first.

Another issue I have is figuring out how to incorporate it into the game loop, but that's mostly because I don't understand the game loop either :|

6 Comments
2024/03/29
20:17 UTC

3

Suggestions for AI for enemies 'with personality' in a turn-based card game?

Hey guys,
As part of my master's thesis, I am responsible for the enemy AI in a turn-based card game for PC. In a recent conversation with the head dev, we were both enthusiastic about investigating how the enemies could have different 'personalities' that influence which actions they take (and additionally what kind of emotes/chatter they show). For example, a barbarian focuses on damaging the opponent and neglects their own defense, and shows this personality by aggressively taunting the player. But before I lock this as the main topic of my thesis, I want to investigate how this could be done and if this is novel. The game plays in rounds of attacking and defending, and a round consists of turns of placing cards on the board. The card's main effects are only activated at the end of the round (dealing/blocking damage). I was thinking I could use different systems for different personalities, so there are clear differences between the behaviors.

5 Comments
2024/03/23
12:04 UTC

1

M-Body Project (non profit AI solution - research group)

Whether you're in the animation field or academic research, get ready for the launch of the M-Body project! Supported by NSERC-CRSNG federal funding, this project brings together a multidisciplinary team from four leading applied research centers across Canada : SIRT Centre, Centre de développement et de recherche en intelligence numérique - CDRIN, MRC Studio Durham College and Laboratoire en innovation ouverte (LLio). Our goal is to provide a collaborative, open-source toolkit and software systems for cutting-edge generative character animation, complete with a high-quality, human motion dataset. #AIgenerative #animationtech #dataset #opensource

Follow us: m-body.ai / Open-source data and tools, for generative animation

0 Comments
2024/03/14
20:00 UTC

7

Solutions for "AI for Games" Ian Millington

Hey Everyone, I have been reading AI for Games by Ian Millington and I was wondering if anyone knows if there are some solutions available somewhere. I cant seem to find any. Thanks!

Also, if anyone has any other books or resources for game AI, id love to hear them. Or even your thoughts on this book if you have read it :)

4 Comments
2024/03/09
23:11 UTC

0

How do I become competent enough at Apex Utility AI + Aron Granberg A* pathfinding for Unity to assist an ongoing project, from scratch?

Sadly, I have little programming experience, but I'd like to learn in order to work on an ongoing project. At the moment I have a couple of resources lined up, like the C# course at CodeAcademy, as well as this resource on learning gamedev: https://github.com/notpresident35/awesome-learn-gamedev . I'd prefer free resources if possible. Thank you to anyone who stops by to read or even comment.

2 Comments
2024/03/09
04:49 UTC

3

2-3 minutes survey for people interested in AI and games

Hey guys!

I'm doing a quick, anonymous survey about AI and games for a little project of mine: https://forms.gle/mocR2Aenewwdqgdb6

Thanks in advance to you, good folks, that are going to give us some of your time and opinions!

2 Comments
2024/03/04
11:49 UTC

0

Amorphous Fortress Online

0 Comments
2024/02/22
19:15 UTC

5

Considering designing a tool for creating games with AI-powered logic and actions

I have seen a lot of AI-powered content creation services (like Ludo.ai), but I have not seen many tools focused on powering logic with large language models. I know there is a problem with cost, and that in the past it has not be viable to design a game with LLM logic because of the enormous overhead.

But I think that will soon change, and I want to make a project that makes it possible for game devs to start experimenting with LLM-based logic. I want to make it easy to design your own objects, actions, and character behaviors within an environment that is dynamically updated.

I am curious if anyone is familiar with any existing projects or tools related to this (currently looking at sillytavern, horde, and oobabooga as potential starting points).

I am also curious if anyone would find such a project interesting. My goal is to make an easy to use playground with little to no code requirement, so that people can start designing the next generation of AI games now and be ready to deploy something once the cost becomes less of an issue.

9 Comments
2024/02/13
20:10 UTC

1

I made a AI play flappy bird

I made a AI in Godot 4 that can play flappy bird, if anyone is interested.

Youtube video: https://youtu.be/9yuPFYosmLA

Project is on Github: https://github.com/bit-flows/flappyAI

1 Comment
2024/01/29
10:38 UTC

2

I want to make an AI for Smash Bros. Melee

I want to create a bot that can learn what the habits of the other player are and just be slightly better than the player. I want it to be able to play games with the player to help learn how to break those habits.

There is an API to connect to slippi, Melee's Dolphin extension: https://libmelee.readthedocs.io/en/latest/

It allows the program to provide inputs to a cpu opponent for the player. There is also already a bot for melee, linked here:

https://github.com/altf4/SmashBot

But there are problems with it. It is way too good and it only plays one character. I want to hopefully improve that. There are ways that I can get the top player's game inputs from slippi, so I have the inputs I need for it I believe. I am just not sure on where to even start with the model. I know I need some type of GAN, but I am not well versed on creating models, just updating them through my job.

1 Comment
2024/01/28
19:40 UTC

1

Searching resources on how to achieve navmesh tiling / stitching?

1 Comment
2024/01/26
16:08 UTC

4

Language based event recognition for one wheeled balancing robot

0 Comments
2024/01/16
17:05 UTC

2

Creating 3D animations using Blockade Labs Skybox AI and Animotive

0 Comments
2024/01/16
13:26 UTC

1

RL for turn based combat.

I am making a game in which there is turn based combat on a grid of varying size. Each player has units they can move, attack and spellcast with. I am using c# with unity and I'd like to use reinforcement learning to make the opponent ai. I looked into unity's ml, but I want to be able to run a server without unity in the future. I am having trouble finding the right tools or resources to help me figure out how to turn the board's state into a form the ML can use. One of my goals is to have the ai train as the player plays so it learns against them as they progress.

3 Comments
2024/01/12
18:54 UTC

5

Tried to make the Spider's behavior natural for the game. WIP still but I think we are on the right track

2 Comments
2023/12/20
11:36 UTC

Back To Top