/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,408 Subscribers

1

League of Robot Runners: A competition for online pathfinding and navigation!

Hello r/gameai!

This is an announcement and call for participation in the League of Robot Runners 2024, a multi-season ๐Ÿš€ competition and research initiative ๐Ÿš€ tackling one of the most challenging problems in industrial optimisation (also game development): Multi-Robot (or Multi-Agent) Pathfinding!

The competition is inspired by current and emerging applications that rely on mobile robotics ๐Ÿฆพ๐Ÿค–. For example, Amazon automated warehouses, where thousands of robots work together to ensure safe and efficient package delivery ๐Ÿงธ๐Ÿ“ฆ ๐Ÿšš โค๏ธ.

Now in its second season, the competition focuses on two core challenges:

  • Task scheduling, where you decide which robot performs which task.
  • Path planning, where you navigate a team of robots across tricky grid environments, including ones drawn from real games (e.g., one of our evaluation maps comes from Dragon Age Origins).

Both setups are online and real-time, which means the clock ticks while you compute. Complete as many tasks as possible before time runs out!

We think ideas from ๐ŸŽฎ game development ๐ŸŽฎ -- especially those for pathfinding and navigation -- could be well suited to solving this type of problem:

  • Strategic planning is needed to best allocate robot resources to tasks at hand
  • Movement and navigation systems in games can offer a head start -- those systems also handle hundreds and sometimes thousands of simultaneous agents
  • Pathfinding and collision avoidance in games is performed in close to real-time
  • Game environments are constantly changing (again, similar to the competition setup)
  • There are always more tasks, which means no fixed optimum exists. As in games, we thus seek high-quality paths, but not necessarily the shortest paths for each agent.

Participating in this competition is a great way to showcase your ๐Ÿ’ก ** strategic and tactical AI skills and real-time programming chops** ๐Ÿ’ก to a global audience of academic and industry experts. After the competition, problem instances and submissions are open-sourced, which increases your visibility, lowers entry barriers for others and helps the community to grow and learn ๐Ÿ‘ฉโ€๐Ÿซ ๐Ÿค” ๐Ÿ“š ๐ŸŽ“.

There is a $10,000 USD prize pool for ๐ŸŒŸ outstanding performances ๐ŸŒŸ across three different categories. Weโ€™re also offering training awards in the form of $1,000 USD AWS credits to help participants reduce their offline computational costs ๐Ÿ˜ป.

Submissions are open anytime, and evaluation results are available immediately on our live leaderboard. The competition runs until ๐Ÿ“… February 16, 2025 ๐Ÿ“…, with results announced in March 2025.

Itโ€™s easy to get started! We provide you with a simulator and code harness (the โ€œstart kitโ€), many example problems, and a visualiser to explore generated solutions. You also have access to last yearโ€™s best-performing planner as a baseline. Visit our website for all the details (www.leagueofrobotrunners.org), or post here if you have questions!

0 Comments
2024/12/05
22:42 UTC

0

Is it possible to make an autonomously moving npc which follows player around the level with deep learning and how?

Hi guys, I will develop a video game with Unreal Engine as my graduation project, and it has to use some deep learning or machine learning to be qualified as a graduation project. I've done some research, and I'm thinking about two topics. The first one is a npc that follows player with using deep learning, and the second one is emotion based decision-making for npc with deep learning similar to the Black & White game. The second one looks simpler than the first one to me because I can't figure out how to autonomously move a npc towards the player because the player's location and direction can be changed continuously, so how can the neural network learn to follow the player correctly around the level? What do you think about these ideas, and do you have any advice?

16 Comments
2024/12/02
11:57 UTC

3

Procedural events generation

I want to develop a system similar to "The Director" from Left4Dead or AI Storyteller from Rimworld. The system's goal is to procedurally generate events depending on context and player actions. The main goal is to make these events meaningful and to generate a narrative via the system.

My first idea was to use Utility AI with buckets of events. But maybe you can recommend some other approaches? I would appreciate any related experience or materials.

4 Comments
2024/11/22
15:35 UTC

5

Another Utility AI question about the size of Behaviors

I'm working on a hobby 3D first-person game where you play as the robotic care-taker on a train escaping from some nameless horror: Oregon Trail vs. Alien Isolation. At each station, you pick up NPC passengers and try to give them the tools to survive, like food, shelter and water, but you don't directly command them on how to use them. In this sense, it felt like The Sims would be a good model for the AI, and I went down a rabbit hole on Utility AI approaches, from The Sims' motives-based system to Dave Mark's really cool talks on IAUS.

I'm going to start with the more approachable Sims system, and I think I understand how the curves that weight the NPC's motives weight the offer of each behavior offered by a smart object. The place I'm circling on is how detailed to make behaviors.

For example, I have a loaf of bread sitting on the bed of the train car. It offers +10 to "fullness" (opposite of hungry) motive. Based on what I've read about the Sims, it seems like the behavior might be as coarse as "eat". However, in a 3D game, to work out a convincing eat behavior, I've found myself making each behavior as a state machine of actions, where each action is similar to an input a player might make. The state machine to eat the bread looks like:

Move To -> Stop (when in reaching distance) -> Drop Held (if already holding an item) -> Pick Up -> Eat -> Done

However, this means every time I make a behavior, I'll have to code up a small state machine to implement it. That probably isn't the end of the world, and behaviors will be reusable on different objects.

As an alternative after reading through some posts here, I saw a suggestion that the behaviors could be as atomic as those actions, so the bread object might offer the following behaviors:

  • Move To
  • Pick Up
  • Eat

All 3 of these behaviors would offer the same +10, so that a hungry NPC moves towards the bread and picks it up, even those those two behaviors don't directly result in the motive being adjusted. Also, impossible behaviors, like picking up the target bread would be rejected if out of range, and eating something that isn't held would be rejected. In this way, the behaviors could self assemble into the more complex sequence I manually coded above. Additionally, if both an "Eat Standing" and an "Eat Sitting" behavior become enabled once the player has picked up the target food, the NPC could choose between those two options without me needing to make two state machines that have lots of duplicated checks.

The place where I start to get unhappy with that approach is the actions are no longer atomic player-like actions. You can't Pick Up without dropping whatever you're holding, and I'm not sure how to reason the NPC into picking that kind of intermediate action purely through behavior weighting. I could make the Pick Up behavior always drop what is currently held first as a practical approach.

So, my question is, is the Behavior-as-a-state-machine approach in the first example a good approach, or is it more maintainable to try to keep Behaviors as small as possible and incentivize them to self-assemble.

16 Comments
2024/11/20
01:22 UTC

0

i have ideas for games, cause i saw a new text to game ai called "exists" where you can make indie games like call of duty, counter stike, fortnite, roblox etc... best idea?

note: i gonna do all games, but from the 1st to the 4th...

View Poll

2 Comments
2024/11/10
13:06 UTC

0

Good news: The submission deadline for EvoMUSART 2025 has been extended to November 15th!

You still have time to submit your work to the 14th International Conference on Artificial Intelligence in Music, Sound, Art and Design (EvoMUSART).

If you work with Artificial Intelligence techniques applied to visual art, music, sound synthesis, architecture, video, poetry, design or other creative tasks, don't miss the opportunity to submit your work to EvoMUSART.

EvoMUSART 2022 will be held in Trieste, Italy, between 23 and 25 April 2025.

For more information, visit the conference webpage:
www.evostar.org/2025/evomusart/

0 Comments
2024/11/08
10:51 UTC

2

Card Game AI - need some pointers

I wanna create a simple card game , a mix of uno and solitaire, i need a computer to play against the player, so i wanna know where can i learn this?

5 Comments
2024/10/21
08:46 UTC

0

Expanding our game-dev/SaaS team, looking for talented writers (Creative Fiction), artist, and programmers (AI + Typescript +PixiJS)!

Hi, I'm the founder of TimeWizardStudios. We create well-written, stylized adult games.

Instead of posting separate ads for each role, Iโ€™ve combined everything here to keep it short and sweet.

ย 

You can find out more about our game here:

https://linktr.ee/acvn

ย 

Weโ€™re expanding our team โ€“ looking to hire artists, writers, and programmers.

Our game Another Chance has been in development for over 4 years, with monthly updates. The current team consists of two writers, two artists, one programmer, and one social media manager.

Each update adds a quest (go here, pick up the item, talk to this character, etc.), ending with a sex scene. The story is dialogue-heavy, with branching routes for characters and different outcomes based on player choice.

ย 

Here is a quick trailer:

https://imgur.com/2RfEatB

ย 

Hereโ€™s a sample of our in-game writing:

https://imgur.com/a/BpHHcfG

^^(please ^^don't ^^apply ^^for ^^the ^^writing ^^role ^^unless ^^you ^^can ^^write ^^at ^^least ^^to ^^this ^^level ^^of ^^quality, ^^sorry ^^but ^^it ^^will ^^save ^^both ^^of ^^us ^^time)

Writers:

We have a lead writer, so we are looking for someone who can add new quests and expand the storyline, continuing with the in-game writing.

This task is actually pretty hard to find a suitable writer for, because our current lead writer is talented (in my opinion), and a big portion of our game's success is that we have a strong script and well-written story.

To join our team, you would have to be able to copy and mimic the current writer's style and prose, plus be able to match all the character voices.

For the writing our budget is $800 - $1,000 per quest. Usually a writer would submit around one quest per month, but we have no strict deadlines.

We are also thinking about branching out and making new games, but any writer (or artist) I hire, I would want to test their skill through our current workload, before working on new projects.

ย 

Artists:

Hereโ€™s our sprite sheet to show our art style. If you can replicate this, Iโ€™ll send you a more detailed style guide.

https://i.imgur.com/e4Bu8cN.jpeg

This link would also be good to review as a writer, as it will show you all our characters and help you imagine them when you write. We have lots of writing documents that outline the whole plot, story, plus we have resources like sprite sheets that show every character with matching emotion/expression.

Honestly, playing the game would grant you the biggest chance at success at any of these roles, as you can see exactly what we are building, how it works and functions, and how all the pieces of art, writing, and programming come together in the final product. Please ask me for a link to the latest release and I will send it to you.

ย 

Programmers:

And lastly for programmers, there are a couple projects I am working on.

I am looking for someone with knowledge of PixiJS and Typescript, as we are building an online visual novel engine.

I am also looking for someone highly experienced in AI and LLMs as there are a couple of SaaS tools I want to build, and one I am already working on right now (a really cool social media management tool).

This is a tech stack that we use for one of our projects:

https://i.imgur.com/59jnovp.png

And lowest on the priority list would be someone experienced in Unity.

I really believe that AI is the future, and I have lots of cool ideas that I want to build integrating it. Virtual assistants, virtual employees, since I run a game dev studio there are a lot of tasks that AI can really help me with, and I am looking for a talented programmer who can help me put all the pieces together.

ย 

I know the programming and art sections were much shorter, but these roles are also important to me, so if you read everything and you feel like there could be a spot for you on the team, please reach out.

Iโ€™m always on the lookout for talented, hardworking, and intelligent people to join the team.

ย 

Contact:

ย 

I actually created a server to help facilitate and manage all this. It's called Rolodex Online

www.discord.gg/8PsYavAa43

ย 

It will be a place where writers, artists, programmers, and all kinds of creatives can join and leave their portfolios. I plan to keep this server neat and organized, to grow it and turn it into a useful tool where people can find collaborators and form projects or relationships.

ย 

When I tried to do recruiting in the past, sometimes I would get too many messages and get stuck. So sadly, lot of people went unresponded.

With this server, we will track and organize everyone's portfolio, and make sure applicants receive timely responses.

If you've contacted me in the past and I never replied, I apologize, most likely I did not do it on purpose. I am trying to fix my bad habits, I lost a lot of really talented people I could have worked with, and that is one of the reasons I am creating this server. I believe it can grow into a big community where creatives can connect and collaborate.

To apply:

Please join the server and leave a message in the relevant category with your portfolio. We can then discuss rates and Iโ€™ll share more resources.

0 Comments
2024/10/11
03:36 UTC

0

Call for Papers EvoMUSART 2025 โ€” Until 1st November 2024

Hey folks! ๐Ÿ‘‹

Are you working on research in Artificial Intelligence for creative purposes like visual art, music generation, sound synthesis, architecture, poetry, video, or design? EvoMUSART 2025 offers a great opportunity to present your work!

๐Ÿ“ Location: Trieste, Italy๐Ÿ“… Date: 23-25 April 2025๐Ÿ—“๏ธ Paper Submission Deadline: 1 November 2024

More info: https://www.evostar.org/2025/evomusart

#ai #airesearch #creativetoots #artย  #design #cfp #music #generative #callforpapers #italyย 

0 Comments
2024/10/05
21:58 UTC

0

AI Building the level as you talk to it

0 Comments
2024/09/22
02:58 UTC

0

Research help needed: CrawLLM - an LLM-based AI generated game pipeline

https://preview.redd.it/k5864rf357pd1.jpg?width=1440&format=pjpg&auto=webp&s=12715c18bb734283dda01fcde7d83863fd0c9667

Hello world! I wonder if you could help me out with my PhD research. I am generating a pipeline for LLMs to re-theme a dungeon crawler with card-based combat, then using SD to create all the spritesheets and images. I would appreciate if you could take some time to fill in this survey:

https://forms.gle/8b7bVG3ZCbDPFMmn7

It's a "fun"๏ธ quiz in which you guess which settings the AI generated images and text fit best! Participation is optional and it's completely anonymous. The survey takes between 10 and 15 min to complete.

Thank you in advance for your consideration, whether you choose to participate or not ๐Ÿ™‚๐ŸŽฎ

0 Comments
2024/09/16
16:18 UTC

5

How to use aggregation in Utility Ai correctly

Hi guys. I'm trying to figure out how to use Utility AI. I gathered all the information on the Internet that I could reach and read all the articles and videos. I made a pet project in unity with my implementation of utility AI. And if there are no problems with the implementation of the entire system. and with the price of the action, everything is clear, it is equivalent to the usefulness of the action expressed as a percentage. Then everything is difficult with aggregation. And I found that the most difficult question is agrigation scores from consideration. and it is very sad, but it is this part that the least information is devoted to. I think if it could be covered in more detail, then the utility AI approach would be much more popular. I have seen several approaches, one of which is multiplying all considerations and using a modifier:

public float EvaluateAiAction()
{
	float score = 1f;
	foreach(var consederation in _consederations)
	{
		float consederationScore = consederation.Evaluate()
		if (consederationScore = 0) => return consederationScore;
		score *= consederationScore;
	}

	float actionScore = csore + ((1- score) * (1-(1/_consederations.Count)) * csore);
	return actionScore;
}

Other options have individual processing of values using min, max, average, sum, product. Which seems more correct to me. But I would like to know the basic principles by which aggregation takes place. how to understand how to combine values and, most importantly, how it relates to how consideration is combined in another action. I know that there are both the founders of this approach and other experienced developers here. I would really like to clarify how agrigation should work.

I will give an example from my pet project so that there is a little context for the discussion. There are aiActions, Considerations, three curves and Tasks for behaviour that should be used to aggregate Considerations.

Tasks for behaviour:

  • if there are more than 0 enemies and the target is not selected, select the target.
  • if there are several enemies, then choose the hero who is closest and has less health to attack.
  • if an enemy who is not a target moves close to the hero and at the same time the current target has health greater than approx 1/4 and you have health less than approx 1/2, then make the target the nearest enemy
  • if the enemy is a target within shooting distance, then shoot at him
  • if the enemy target runs away beyond the distance of the shot to catch up to the distance of the shot , but if there are other enemies nearby and the distance of the target is more than approx 1/2, then hit the target of a new enemy.
  • if the enemy is within striking distance with a sword or close to attack with a sword and if there are few enemies nearby
  • if life is short and the number of enemies is large, then prefer ranged combat even if the enemy is close
  • if there is a shelter nearby, then choose the nearest one and hide behind it and shoot until the enemy is in the melee range or starts running away. if you are behind cover and a lot of enemies have run up and their health is too low, then retreat to a safe distance and shoot
  • if life is very low , then drink a healing potion
  • if there are few healing potions and life is not enough, pick up the nearest healing potion if there is one
  • if there is little life and the life of the opponent, or if there are several of them, then the life of the healthiest opponent is more than approx 1/4 and there are no healing potions and there are no lying potions around, then run away
  • if the position of the hero has changed, count the smallest shelters and poi of health potions.

Actions:

  • PickATarget
  • Archery
  • Melee
  • MoveToArchery
  • MoveToMelee
  • UsingCover
  • DrinkHealingPotion
  • PicUpHealingPotion
  • Escape
  • StepBackForArchery

Consideration:

  • HeroHealth
  • HealingPotionStock
  • HealingPotionPoiCount
  • NearestHealingPotionPoiDistance
  • CoverStock
  • CoverPoiCount
  • NearestCoverPoiDistance
  • EnemyCount
  • TargetEnemyStock
  • TargetEnemyDistance
  • TargetEnemyHealth
  • NearestEnemyDistance
  • NearestEnemyHealth

Curves:

  • CountCurve ( value / enoughtCount ) ->> enoughtCount = for Poi Cover = 3 | for Healing Potion = 5 | for Enemy = 4
  • HealthCurve ( value / maxHealth)
  • DistanceCurve (value / defaultDistance)

In each Consideration class, I have a metod Evaluate , which usually applies curve to the incoming values anp performs something similar to this:

public float Evaluate(int value, int maxValue) 
{
	_score = _curve.Evaluate(Mathf.Clamp01(value / maxValue));
	return _score;
}

(perhaps later need to do only one type of class and just passing the curve inside)

In each AiAction class, I have a metod EvaluateAiAction that gets a scores of Considerations and has to agrigate them. An example for "DrinkHealingPotion":

public float EvaluateAiAction()
{
	var visibleHealingPotions = _aiBrain.GetNumberOfVisible(VisibleTypeE.HEALING_POTION);
	var targetEnemy = _aiBrain.GetNumberOfVisible(VisibleTypeE.TARGET_ENEMY);
	var nearestEnemy = _aiBrain.GetNumberOfVisible(VisibleTypeE.NEAREST_ENEMY);
	var distanceToHealingPotion = _aiBrain.GetDistanceOfNearest(VisibleTypeE.HEALING_POTION);
	
	var nearestHealingPotionDistance = _allConsiderationsDict[ConsiderationTypeE.DISTANCE].Evaluate(distanceToHealingPotion _stats.Speed);
	var healingPotionStock = _allConsiderationsDict[ConsiderationTypeE.COUNT].Evaluate(_heroInventory.HealingPotions, 5);
	var healingPotionPoiCount = _allConsiderationsDict[ConsiderationTypeE.COUNT].Evaluate(visibleHealingPotions, 5);
	var heroHealth = _allConsiderationsDict[ConsiderationTypeE.HEALTH].Evaluate(_stats.Health, _stats.MaxHealth);
	var NearestEnemyHealth = _allConsiderationsDict[ConsiderationTypeE.HEALTH].Evaluate(nearestEnemy.Stats.Health, nearestEnemy.Stats.MaxHealth);
`	var TargetEnemyHealth = _allConsiderationsDict[ConsiderationTypeE.HEALTH].Evaluate(targetEnemy.Health, targetEnemy.MaxHealth);

	float score = ????????????????; // the main question concerns this place
	
	return score;
}

(perhaps later you will need to do caching from the outside, but now the main thing is to understand the principle of the aggregation approach)

image of curves https://i.imgur.com/ueR0sic.jpeg

3 Comments
2024/09/14
20:49 UTC

1

Open Discussion on AI Integration in Video Games: 2024 and Beyond

Hello everyone! Iโ€™m currently conducting research throughout my second-year masterโ€™s program in design on the implementationโ€”or rather, the ways in which video games are adapting to advances in AI by integrating them into gameplay. This includes the emergence of new NPCs with integrated LLMs, as envisioned by Ubisoft, as well as other visual, narrative, or gameplay initiatives. Iโ€™m open to any discussions, references, or connections with people in the industry to enrich my analysis, state of the art, and potential avenues of exploration. Thank you all !

3 Comments
2024/09/10
19:27 UTC

3

Separation Behavior from "AI for Games"

I recently bough the book AI for Games by Ian Millington. I've liked it so far and have been trying to implement each behavior in godot 4.2. However for some reason the separation steering isn't working as expected. Instead of moving away from each other. Characters move towards each other. At first I though maybe the decay coefficient needs to be negative (and that does seem to fix the issue) however he clearly states:

The k constant can be set to any positive value

And later on when describing attraction.

Using the inverse square law, we can set a negative value for the constant of decay and get an attractive force.

So it seems like that value should be positive to separate and negative to attract. Yet I'm getting the opposite behavior.

This is my code:

separation component code:

class_name SeperationComponent
extends Node

@export var MAX_ACCELERATION :float
@export var THRESHOLD :float
@export var DECAY_COEFFICIENT :float
@export var character :CharacterBody2D

var targets :Array[Node]

func get_seperation() -> SteeringOutput:
  var result := SteeringOutput.ZERO()

  for target :CharacterBody2D in targets:
    if target == character: continue

    var direction :Vector2 = target.global_position - character.global_position
    var distance :float = direction.length()

    if distance < THRESHOLD:
      var strength :float = min(DECAY_COEFFICIENT / (distance * distance), MAX_ACCELERATION)

      direction = direction.normalized()
      result.linear += strength * direction

return result

character code:

extends CharacterBody2D

@onready var seperation_component :SeperationComponent = $SeperationComponent

func _ready() -> void:
  seperation_component.targets = get_tree().get_nodes_in_group("target") 

func _physics_process(delta :float) -> void:
  var result := seperation_component.get_seperation()

  if result.is_zero():
    velocity = Vector2.ZERO
  else:
    velocity += result.linear
    rotation += result.angular * delta
    _clip_speed()

  move_and_slide()

func _clip_speed() -> void:
  if velocity.length() > 50:
    velocity = velocity.normalized() * 50

And pseudo code from the book:

class Separation:
    character: Kinematic
    maxAcceleration: float

    # A list of potential targets.
    targets: Kinematic[]

    # The threshold to take action.
    threshold: float

    # The constant coefficient of decay for the inverse square law.
    decayCoefficient: float

    function getSteering() -> SteeringOutput:
        result = new SteeringOutput()

        # Loop through each target.
        for target in targets:
            # Check if the target is close.
            direction = target.position - character.position
            distance = direction.length()

            if distance < threshold:
                # Calculate the strength of repulsion
                # (here using the inverse square law).
                strength = min(
                    decayCoefficient / (distance * distance),
                    maxAcceleration)

                # Add the acceleration.
                direction.normalize()
                result.linear += strength * direction

    return result

I'm using the Separation behavior independently. So the Scene starts with a couple of characters that are too close together. And the behavior moves the characters away from each other (or closer in my case).

Not sure what I'm doing wrong. Any help would be appreciated.

6 Comments
2024/09/06
12:25 UTC

4

Gamedev using AI? Talk to me

I want to talk to game devs for a short mini-doc, focusing on the videogame/VO actor strikes currently going on.

Questions will be surrounding the agreements Sag-Aftra are trying to negotiate and what people think the realistic outcome will be, going forward.

I need a โ€œpro AIโ€ take from a game dev, someone who can balance the argument for the film. People are keen to know how the tech will improve the gaming industry and enrich the player experience.

Itโ€™ll go out on my YouTube channel, which is a subscriber base currently made up mostly of gaming enthusiasts.

Previous work here: https://youtu.be/vHBjjRZV7No?si=1VnpOlY2vMYFwoOV

I am Luke Dale (actor/filmmaker). I play Hans Capon in Kingdom Come: Deliverance, a major historical RPG launching next year.

My audience will be very interested to hear from you, so donโ€™t hesitate to get in touch.

3 Comments
2024/09/04
22:42 UTC

1

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

5

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

7

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:

3 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

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

3

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

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

Back To Top