Questions tagged [ai]

The design and/or logic of how an in-game entity makes decisions about its behavior.

Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

NavMesh Runtime Generation In Specific Areas

Unity allows the runtime generation of NavMesh surfaces with the Unity.AI.Navigation package through the BuildNavMesh method. However, this function re-bakes the entire NavMesh in the current scene, ...
1 vote
1 answer
62 views

Flying AI shakes when chasing and avoiding obstacles simultaneously

I've got a problem with my flying AI in Unity. When it just chases a target it's ok, but my system contains avoiding obstacles so when it starts to do it, it shakes weirdly. As I understood using <...
3 votes
1 answer
2k views

How do I implement wander behavior in GDX AI?

So I follow the original gdx-ai documentation and created 2 circles to test Steering behavior. The image shows arrival behaviour but I am still quite lost about how they work. Screen class: ...
8 votes
2 answers
2k views

NegaScout with Zobrist Transposition Tables in Chess

I'm trying to put Transposition tables into my alpha beta scout. I do see an incremental speed boost I think toward mid or late game, however, even with a table size of 1-2GB, its may or may not be ...
0 votes
1 answer
116 views

Do "procedurally generated" skyboxes on the Unity Asset Store use machine learning trained on existing images?

I noticed that some skyboxes on the Unity Asset Store specifically say they use AI image models like Stable Diffusion, for instance "Stylized Space Skybox pack": The description of this ...
2 votes
4 answers
3k views

How to Prevent Enemy Overlap

I am working on a 2D side-scrolling action platformer. I am currently working on the state logic for my enemies. These are humanoid enemies that walk on the ground They currently have idle, patrol, ...
0 votes
1 answer
51 views

Why are the transform game objects moving away from the snail when they are swapping their direction?

I am making a game in which I created a character (main player) and another character(snail). Now the snail will move on the ground, when there is no ground detected it will change its direction. I ...
0 votes
2 answers
127 views

How to make ranged RTS units move to their firing range from an opponent using flow fields?

I am trying to make a simple real-time strategy game (only the battle system of units fighting each other; no building, no economy, only battles and victory). I am using flow fields to make the units ...
0 votes
0 answers
91 views

Obstacle avoidance via steering behaviour when near gaps

I'm trying to implement RTS-like character control on C++/SDL2 for a character with a rectangular hitbox. I have a path-finding algorithm ready and I want to implement obstacle avoidance steering ...
0 votes
1 answer
113 views

How to make enemy turn to face the player while attacking?

I need help making this code work. It is made for the enemy AI to move and patrol, chase the player and attack the player. The problem is when it starts to attack the player, then the player can move ...
8 votes
5 answers
8k views

How to lead a moving target from a moving shooter

I saw this question: Predicting enemy position in order to have an object lead its target. My situation is a little different though. My target moves, and the shooter moves. Also, the shooter's ...
0 votes
1 answer
424 views

Make enemy follow player intelligently

I was trying to make a script to make my enemy follow my player intelligently (but not too much) and I want to know if there was a better way to do it (of course there is but I wanted to find a way ...
0 votes
2 answers
115 views

How does a bot know who is an enemy?

How does a bot know who is an enemy if "enemy" encompasses not only one player, which can be just hardcoded? For example, in Warcraft 3, we can have two bot teams with faction alliances and ...
0 votes
1 answer
135 views

Context-based Steering

I added context-based steering functionality to my 2d sideview free-roam shoot-'em-up game. Essentially enemy units emit raycasts eventually towards every direction, I determine interest and danger ...
0 votes
0 answers
44 views

How to apply avoidance to path following with root motion?

My Character Blueprint uses Root Motion to control locomotion (taking location and turning it into a direction to move). However, root motion is not compatible with avoidance pathfinding such as ...
-1 votes
1 answer
72 views

where should i start if i want to make an enemy from robots forever 2 (or if you are unfamiliar a physics based enemy that uses procedural generation)

this is probably a long shot, but I didn't really know where to ask this question. I just wanted to ask if anyone knows any resources that can help explain how to make something like this. Thanks, and ...
0 votes
0 answers
76 views

applying gravity breaks entirely this AI movement code

I'm calling this function every 0.078 seconds so about at 13 fps using a timer connected to _ready() this way my game can easily run over 400 enemy units with ...
1 vote
1 answer
140 views

How to efficiently detect targets for AI?

A creator named NovemberDev made this game without having performance in mind, yet his enemy AI, while being relatively simple, is still extremely fast: his game can have hundreds of enemies all ...
1 vote
1 answer
124 views

How to implement NPC that reads player input and counters it?

input reading = NPC reads the input of the player and instantly reacts to counter everything the player does. So, is it like : ...
0 votes
1 answer
149 views

AI for global decision-making in 4X games

I understand how things work in combat, but not quite in terms of global decision making. For example, in Civ, at the global level AI has to juggle multiple objectives, e.g. whether to invest money in ...
0 votes
1 answer
1k views

Unreal Engine 4 AI Character Pawn Entirely Unresponsive to Movement Commands

I'm new to game development and to Unreal but I cannot for the life of me get my AI character pawn to move at all using any method I know. I'm developing a 2d Sidescroller game using a Tilemap. I have ...
1 vote
0 answers
71 views

Using physics to maneuver a spaceship through a point with a specific velocity

I've been tinkering with a space simulation. There are ships, and the flight code can modify the velocities and orientations of the ships directly, with limits for maximumSpeedChangePerSec (basically ...
2 votes
2 answers
810 views

How to implement "computer player" for a card game based on a few rules?

I'm developing a gameboard for a 4 players cardgame well know in my region (like a Bridge with 8 cards). I create a cardcontrol class, all the deck methods and all the logics for value card and score ...
0 votes
1 answer
73 views

Cannot access pawn from attached actor component

I have a pawn blueprint that contains some AI movement code, and looks like this: Now I'm attempting to move that functionality into an actor component so it's easily transferrable to other enemy ...
3 votes
2 answers
2k views

Ue5 AI MoveTo does not work

I have been having problems working with AI MoveTo and created a very basic version in the hopes of finding the problem: As you may see, I have one single character with the default skeletal mesh and ...
0 votes
0 answers
25 views

Minimal number of pairwise signals (mutexes) to follow a schedule

For a factory simulation, NPCs walk a path and stop in between to do things in work areas. My task is to find the best work schedule. The NPCs can of course collide with each other on their way. This ...
18 votes
2 answers
6k views

Why is reinforcement learning not widely adopted as an AI tool for agents in well-known games?

Reinforcement learning has shown remarkable success in game-playing agents, as seen in the achievements of AlphaGo and OpenAI's Dota 2 AI. There are a few tools, such as Unity ML Agents, to integrate ...
0 votes
0 answers
46 views

AI or simulated approach for 4 player spades

I’ve read the strategies but would like to learn better moves. Sometimes watching a simulated AI game with take backs allows me to learn how to eventually play better. For 2 player it is fairly simple....
0 votes
1 answer
768 views

Unreal 5 Actor Can't Move

I have an Unreal 5 actor with some basic blueprints involving a "Simple Move to Location". I've created a NavMeshBoundsVolume, and both the actor and destination point are inside it. The ...
0 votes
1 answer
486 views

Minimax Algorithm Scoring Mechanism

I'm basically trying to understand the chronology/sequence of the algorithm and where should I call the scoring mechanism function that calculates the score of each move and returns an int. For ...
1 vote
0 answers
92 views

steering behaviors collision avoidance: vehicle shaking before arrive at destination

I have made a test sketch of collision avoidance using javascript, as you can see right here. I want the vehicle to move to the clicked location, avoiding obstacles on the way. It is working, but not ...
0 votes
0 answers
16 views

Does Unity have any automated parameter tuning?

I have parameters like -detect enemy range -firing range -coverage zone width -etc. for a dodgeball game and ideally would like to run the game over and over until I get the highest win rate against ...
47 votes
9 answers
34k views

How does pathfinding in RTS games work?

[crossposted from stackoverflow] In a game such as Warcraft 3 or Age of Empires, the ways that an AI opponent can move about the map seem almost limitless. The maps are huge and the position of other ...
3 votes
1 answer
584 views

Characters ai code organization

I want to create a an ai with finely customizable character. The ai should be able to handle generic behaviors, like scheduled activity, shared across all character, but have specific override for ...
1 vote
1 answer
572 views

Random NPC Movement & Stopping Within A Specific Distance

I'd like my NPC characters to move and stop randomly within a certain range. Here's an example of how I'd like the orange NPC to be able to move and stop freely within the green box: Is there a ...
3 votes
1 answer
107 views

How do I design a "Chores" or "Errands" system?

I have a number of entities running around in my game, and I am running into a headache trying to design and implement a system for them to both generate and assign the tasks. More than anything else, ...
8 votes
3 answers
3k views

How to implement a job queue system?

Essentially I'm trying to make a system which you can add a job to it then finds an AI which is idle and gives it that job to do, For an example look at Prison Architects job list system (image below)....
0 votes
1 answer
150 views

Implementing a bot to find the player in a grid

I have a 2d array with ground represented by 0s and the walls represented by 1s. Player can use a LOOK command or a MOVE command. Look command returns a 5x5 array centered around the player and the ...
3 votes
2 answers
829 views

How should I design my AI in 2D fighting game?

I am currently trying to make an AI for my 2D Fighting Game like Brawlhalla or Super Smash Bros. The problem is that I don't know how to go around doing it, like what algorithm should I use. The ...
0 votes
0 answers
173 views

How to fix flaw with context steering

I have implemented steering behaviours where I get eight cardinal directions and calculate the 'interest' and 'danger' values for each direction and get the average of these for the enemy's output ...
2 votes
0 answers
155 views

Scheduler for Event Driven Behaviour Tree

The Behaviour Tree Starter Kit (BTSK) on GameAI Pro suggests using a scheduler for an event driven behaviour tree. To recap: A behaviour tree (BT) is traversed fully every time the root node is ticked ...
0 votes
0 answers
69 views

How to create a basic strategic AI?

I started creating a Vue3 version of the classic Sid Meier game Colonization. I have the basic player mechanics in place and even created a map editor. So I have 3 of the 4X in place: Explore, Expand ...
1 vote
1 answer
291 views

Where to Save Health on Character with Behavior Tree - UE5

I've looked but havn't been able to find a the workflow for this searching online. I have an NPC, with a behavior tree. Right now it just moves around the map. It's supposed to have a health variable, ...
1 vote
1 answer
3k views

How can I obtain in-game data from Warcraft 3 from an external process?

I am implementing a behavior algorithm and would like to test it with my lovely Warcraft III game to watch how it will fight against real players. The problem I'm having is that I don't know how to ...
0 votes
0 answers
106 views

Simplifying game mechanics in "unseen" battles

I am writing a grand strategy game that is generally played from a zoomed-out, "strategic" perspective. With battle encounters, I want players to be able to zoom in, if they choose to, ...
15 votes
2 answers
3k views

Is precomputed pathfinding still relevant?

Context Old Lucas Arts (ScummVM era) point and click graphic adventure games used precomputed pathfinding. Here's a rough outline of the technique. Step 1 The floor in each room was divided into ...
0 votes
1 answer
122 views

Reach a moving point smoothly

First, for my specific problem, we can assume we're working in a 1D space. I have a point B moving at a specific velocity V. I want to smoothly move the body A so it reaches the point B and moves at ...
0 votes
0 answers
147 views

How do buildings in (Tile based) city builders/colony sims keep track of each other? [duplicate]

Like, how does a building in these games know if they're being powered? Or if they're within range of influence of a hospital or fire station, etc. How would they know where to send an NPC or ...
8 votes
3 answers
4k views

How to implement AI for fighting game

I built a 2D fighter yesterday. The second 'player' does hardly anything. Actually, nothing. To be honest, I have never made a game before that had an opponent like this. So my question is, how ...
1 vote
1 answer
523 views

When to use AI prediction in a Fighting Game

I am making a fighting game AI that can predict the player's next move using a N gram predictor. Once I have the prediction, when do I use it? Do I wait until the player makes a move and then use the ...

1
2 3 4 5
17