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
1answer
48 views

AI does not stop walking like it is supposed to, instead spins in place and lags game

I've got this very simple enemy AI that follows the player and is supposed to stop and shoot at the player when he enters a trigger, however it doesn't seem to do that it doesn't stop or shoot. This ...
0
votes
0answers
23 views

Finding the site of the potential collision between 2 vehicles

I've been trying to implement the unaligned collision avoidance steering behavior. I get what needs to be done on a high level, but struggle with the maths behind it. On Craig Reynolds site, he ...
1
vote
2answers
65 views

Agent trying to reach same position as other agents, instead start spinning in place

I create units in my game and have a rally point where they should walk to when created, like Age of Empires. My problem is that since they compete for this position after a while, sometimes they end ...
0
votes
0answers
28 views

How to follow target player on a waypoint graph?

Situation: It is an AI agent (yellow box) and a player (blue box) in the game. There are waypoints (red circles) placed on the map. The AI should follow the player. The pathfinding algorithm runs on ...
0
votes
0answers
23 views

Preventing jittering during flock arrival in tileless environment

Units trying to follow an invisible leading unit, start jittering (or oscillating if not updated every frame), when the leading unit stops or slows down and others eventually try to gather around it. ...
21
votes
4answers
8k views

How to make AI detect a target behind a wall, who is only partially exposed?

I'm making an FPS game where, even when a target's whole body is behind a wall or box, but its finger or foot exposed, the AI should be able to detect it and shoot its finger. So far the way I've ...
0
votes
0answers
30 views

Minimax implementation problem

it's my first time posting so apologies in advance if the format is weird. I'm developing a board game that's very similar to checkers/chess and I've faced some problems implementing the minimax/...
0
votes
0answers
25 views

How to assign xNode graphs to an active object?

I am trying to create a basic AI using the xNode visual scripting tool. The getting started guide from github is not showing how to assign the created graphs to an active object (if this is even how ...
0
votes
1answer
46 views

Design pattern for AI cooperation

I'd like to implement an AI for my game, which has agents that should be able to take care of themselves. The Sims use a system of smart objects that advertise their services, a design pattern that ...
0
votes
0answers
21 views

AI Help - Simulating my game for decision making (Monte Carlo)

My game is a tile based tactical rogulike similar to Final Fantasty Tactics. Characters can move to any square within their movement range on every turn , and perform as many other actions as they can ...
1
vote
1answer
124 views

Turn-based combat AI with multi turn planning

My current AI system uses the now very common utility AI. I generate a list of possible actions, I then calculate fitness score for each action and generate a list of possible chains of actions (Move >...
5
votes
2answers
101 views

How to avoid units with different destinations blocking each other in corridors?

I'm making a roguelike in which enemies wander around the map until they're detected by the player. They each have random destinations, so sometimes their destinations conflict and they block each ...
0
votes
0answers
36 views

Agent stuck with each other

As the title. I have stuck on this: When many agents have same destination, they will be stuck with each other. I want they find a new path as character in the picture a attached below How can i make ...
0
votes
1answer
113 views

Struggling to get AI to repeat infinitely

I am following this as a guideline to help me figure out a simple AI for an enemy as I am new to java. https://www.javacodegeeks.com/2014/08/game-ai-an-introduction-to-behaviour-trees.html https://...
0
votes
1answer
25 views

Manually update rotation of only Y-axis on Agent

I have some code to manage to rotation of my Navmesh agents: ...
0
votes
1answer
95 views

2D party follow the leader in Unity?

I am attempting to make a 2d side-scrolling platformer where the player collects other characters as they advance through the levels, like you would in a classic top down rpg. However, I am having a ...
0
votes
0answers
25 views

Unexpected changes in Ai population

I've been trying to do my first evolution script. I want my population to learn to walk in 3d space. I am getting issues with the movements and the mutation. In my script, they evolve based on certain ...
3
votes
2answers
194 views

Moving large group of units 1 by 1 takes too long, how can I improve this?

I use use Unity's own NavMesh/AI system and I think it works pretty well. The only problem I have is that when I move large groups of units, they will find a path one by one, but it takes a really ...
0
votes
0answers
34 views

Improving Utility AI to have “strategy thinking”

Consider Utility AI - where an agent is decide its next move by the one that gains the maximal utility. I wonder what general tweaks/improvments there are to this model in order to make it with a bit ...
0
votes
0answers
34 views

Unity - Moving X amount of units to destination, RTS style movement

I have a reached a point now where I can select X amount of units, and move them to where I click. My problem is, they all try to get to the same point. I use Unity's own Navmesh + agent. I set ...
1
vote
0answers
20 views

Having difficulty integrating flow field with flocking algorithm

I have been tweaking my path-finding in my game for a while now, and it's mostly functional, but there are some major issues that are holding me up. I have a flocking algorithm implemented to help ...
0
votes
0answers
18 views

Steering behaviours that gaurentee not to hit something

I'm really struggling how people make steering behaviours that guarantee a given agent will never hit something. I want to have a flocking algorithm that the agents can follow each other and also ...
1
vote
2answers
121 views

Balance advantage of having the first turn

I'm developing a game in which two players compete for area domination. Each player can play four moves per turn, ideally conquering four tiles. Edit: Here a little more detail on the mechanics: Each ...
0
votes
0answers
90 views

Move Unity NavMeshAgent at a constant speed

My NavMeshAgent randomly changes speed while moving along it's path. It seems to be slower when a segment of a path is shorter (between two waypoints/corners) or when there are many close continuous ...
1
vote
0answers
58 views

RTS Pathfinding without collision between units Options

Ever since I made my units move to a certain location a problem has popped up that of course if I try to make two or more units go to the same place they fight for the same spot. Am I just being ...
1
vote
0answers
53 views

Most efficient way to recalculate enemy A* path on the fly?

I'm working on implementing a more robust pathfinding algorithm for the enemies in my top-down shooter game, and I have the A* algorithm working, but now I need to decide when to calculate the path. ...
0
votes
0answers
25 views

D* lite optimized: what is wrong in my implementation of Search() function?

I'm trying to implement the D*-Lite pathfinding algorithm, as described in the 2002 article by Koenig and Likhachev for grid-based navgraph. But I stuck with problem. My ComputeShortestPath (in my ...
1
vote
2answers
135 views

How can I make my race game fair with all players and keep it climatic?

I'm making a minigame where up to 5 players have to race against AI or another player(the "enemy"). The race consists of prompts, the current player is asked to press a key in a given amount of time ...
2
votes
2answers
101 views

Catan Optimal Placement

Is it possible to calculate the best possible placements for settlements in Catan without using an ML algorithm? While it is trivial to simply add up the numbers surrounding the settlement (highest ...
0
votes
1answer
41 views

How to make a follower script without diagonal movement

I’m working on a 2d game in unity. Right now I’m trying to make a follow ai. Where a character will follow the position of the player. I currently have it set it and working using the MoveTowards ...
5
votes
1answer
200 views

How to Store AI Knowledge about the Game-World for AI Decision Making

I have a game-world with a fair amount of AI that have some Senses, like vision, hearing, touch, smell, etc. But I'm not sure how to put that information in a single place for the individual AI to ...
0
votes
1answer
998 views

How to use TensorFlow in Unity

I am trying to implement a deep reinforcement learning IA with TensorFlow for a checker game in Unity. How can I do this? I've searched for it on Google and found a lot of videos and tutorials on how ...
1
vote
0answers
31 views

Player Ai for games involving scoring goals like soccer, hockey, basketball?

I've been working on a soccer game, and was thinking of different ways to program player AI's and was wondering how they actually work. The concept is probably similar to all games where there are ...
0
votes
2answers
466 views

2D active ragdoll/physics-based procedural animation

I'm trying to make a 2D quadraped robot stand and walk via physics. My robot looks like this. (art is not mine. Source is vapgames) It's rigged via Unity's 2D animation package and each joint/bone ...
1
vote
1answer
39 views

Find the direction a Projectile should be fired from a Moving Object to hit another moving Object?

I am trying to do a simple AI Controller, which fires Missiles at the surrounding targets in the Scene. The AI Controller can fire projectiles when moving or stationary. The Targets are either ...
0
votes
1answer
102 views

Moving an Enemy Toward the Player but only in cardinal+diagonal directions

I am working on a "quick project" to get my feet wet and to put something finished in my projects. I want to make an enemy that constantly tries to be aligned with the player object, but doesn't ...
0
votes
0answers
32 views

How to check in Unity whether tile B can be reached in a straight line from tile A?

I'm currently trying to smooth out my A* paths based on this article. This is what I want to achieve: But sadly I'm stuck at implementing the Walkable method. I ...
0
votes
2answers
133 views

AI Behaviour design pattern which handles lots of diverse behaviours and mechanics?

I'm working on an 2D overhead topdown game in Unity3D and I want the enemies to have lots of diverse behaviours. How should I design the architecture with this in mind? For example I want: A simple ...
2
votes
1answer
103 views

How to Steer a Moving Object Away From Another Object(s)

I'm working with C# in Unity, and I'm making a top-down space shooter game in which there are many different AI-controlled ships flying around. The problem is that these ships often fly on top of one ...
1
vote
1answer
44 views

How does one organize AI interactions with Local and Remote Players?

Scenario: In a first-person multiplayer game, an AI monster grabs a player. (This would be first-person player on the client's local machine, and a third-person remote player on the master and other ...
21
votes
3answers
7k views

Efficiently pathfinding many flocking enemies around obstacles

I'm working on trying to improve the pathfinding for my game's enemies. Right now, they basically just constantly move towards the player's exact position by calculating the angle between themselves ...
0
votes
0answers
15 views

2d topdown enemy moving to player without overlap

I'm attempting to make an enemy move towards a player in a topdown 2d game. Currently I have it working, by getting the angle from the enemy to the player, then sin and cos to get the destination ...
1
vote
2answers
68 views

How to make a gameObject follow non trivial trajectories?

as the title of the question says, I was wondering if there is common method to make gameObjects e.g. enemies or bullets follow curvilinear trajectories before reaching their target. For instance, ...
2
votes
2answers
47 views

Why is the Enemy not changing direction when entering the collider?

I'm really new to Unity, and I'm trying to make a 2.5D platform game. I want to make my enemies walk on a platform and turn when they reach the end of the platform so I placed two triggers at the ...
1
vote
2answers
109 views

How can I make a computer opponent for my board game?

I am trying to create a game, not exactly checkers, but the level of its interactivity is on par with checkers as opposed to something more complex (I think) like chess. Anyway, according to my ...
0
votes
1answer
91 views

How to prevent enemies from oscillating left and right during chase?

I have a grounded enemy with a simple chase state. When in this state, the enemy moves with constant vel.x toward the player. If my player jumps directly above the enemy however, the enemy will ...
0
votes
3answers
445 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, ...
1
vote
0answers
104 views

How to develop a bot for a(n) (arbitrary) FPS game without a game API?

I've been interested in artificial intelligence in computer games for a long time. The question that I have been asking for a long time and to which I have not yet found an answer is the following: ...
1
vote
0answers
52 views

Using MCTS in Unreal Engine

I have been making a turn-based board game in UE4 and have come to the point of making a first pass on the AI. I planned to use Monte Carlo Tree Search but this requires you to make (at least) one ...
0
votes
0answers
46 views

Emerald AI animal not fleeing

Hey guys I have set up a =n animal to be a cautions cowered but he stops instead of running away. I am using unity version 2018.3.11 with emerald AI 2.2. Here is how I have the scene set up : Emerald ...

1
2 3 4 5
15