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
0answers
13 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
42 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
47 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
21 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
115 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
90 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
38 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
174 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
93 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
30 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
107 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
27 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
50 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
31 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
119 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 ...
1
vote
1answer
59 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
41 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 ...
20
votes
3answers
6k 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
14 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
60 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
96 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
88 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
223 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
73 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
41 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
36 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
vote
3answers
189 views

Algorithm for a dense crowd of people who avoid the player?

I want to make a game like this. When player moves other humans will move too. And other humans will push people around. Are there any algorithm for this ? How can i solve this very efficient way ? I ...
0
votes
2answers
46 views

Pathfinding with direction considerations

Consider the following road network. The car (orange) needs to get to the red circle. It drives on the right hand side of the road and is initially facing down. The shortest path is the blue one. But ...
3
votes
0answers
108 views

Coding Relationships in Games [closed]

I'm interested in researching coding techniques for coding relationships in games. I'm trying to look for resources, but haven't really come across anything yet. More specifically, in games where ...
0
votes
1answer
51 views

How to change the speed of an NPC?

I created a blueprint. I added several components to the blueprint. I made it follow a target point and it does it correctly. I'd like to make the NPC make this way to the target point faster, but I ...
2
votes
1answer
83 views

How to stop switching between paths to a moving target?

I've noticed after implementing A* pathfinding into my game, that there is exploitable/unrealistic behavior that goes on when the player moves between two nodes that alter the path of the AI trying to ...
0
votes
1answer
50 views

Error in the order of the target points to be followed. How to set the order of elements in an array?

I have a project where it has 1 NPC and 3 target points: In the project I set the NPC to go to target point 1, then to 2, then to 3. Expected path: Path that is occurring: This problem did not ...
0
votes
3answers
211 views

How do one NPC follow a succession of target points?

I have a project that contains 1 NPC (AI) and 2 target points. In the project I can make the NPC follow any of the 2 target points, but I can not get it to follow target point 1 and then target point ...
2
votes
1answer
103 views

Need instructions for my AI racing car game

I'm having a school project to create an 2D AI racing car game, but nobody know where is the destination, and the map is randomly generated. But to avoid the dead end, we must teach the car not to ...
3
votes
0answers
64 views

How to implement path-finding with a large number of blocking agents following similar paths?

I want to implement a demo like creeps laning in Dota 2. So for simplicity, there is Left team and Right team, they are enemies. Units from Left team move toward Right base, and units from Right team ...
0
votes
0answers
17 views

Tron type game AI algorithm [duplicate]

Im looking for a tron AI algorithm on snap!/scratch. If not can you help me develop an AI for this game?
1
vote
1answer
47 views

Is there a tried-and-true method for calculating or detecting the edges of platforms?

In terms of a simple 2D platformer, I was wondering if, over the years, a right way has emerged as far as determining whether or not a strolling character has reached the edge of the platform it is ...
0
votes
2answers
337 views

How to avoid enemies overlapping each other when chasing player in Unity?

I am trying to get enemies to chase player but without them overlapping each other when they get closer to the player. So far what I have is that I check for the distance between current enemy and ...
3
votes
1answer
138 views

Which Pathfinding Algorithm is Best For My Case?

I'm creating a top-down space shooter game where there is no real "map" per say since there is no real terrain, but there are obstacles in the form of asteroids, other ships and a few circular ...
0
votes
0answers
39 views

Chess AI Finding Checkmate Using MinMax

I have implemented a chess AI using a Mini-Max(With a partially working AB pruning) implementation. At the moment, it can search a depth of 5 and it is capable of playing a good middle-game. It pretty ...
0
votes
1answer
86 views

Minimax not blocking moves on board game

I have a minimax player for the gomoku game, connect 5. The minimax player does not block the moves when there is potentially 5 in a row or 4 in a row. I would appreciate if anyone can show me what I ...
1
vote
1answer
35 views

Python/java framework for developing artificial intelligence for board games like Diplomacy/Risk [closed]

I am trying to pick a python/java framework for developing artificial intelligence for board games like Diplomacy/Risk for research purpose. I am specifically looking for multiplayer, multiple-round ...
1
vote
0answers
102 views

Is there an established way to create a 2D XY NavMesh in Unity?

Specifically, one in the empty space between colliders, rather than on an XZ plane (more or less) over the surface of a collider? Specifically this is because I have a drone, in a current project, ...
0
votes
0answers
237 views

how to make AI do jump on navigation mesh system?

hi :D i'm currently using unreal for make a sand-box game for learning purpose. and due to the unique attribute of sand-box game, i am looking for how AI move naturally on map (which changes so often)...
1
vote
1answer
67 views

Snake AI - Is a Hamiltonian approach valid for all grid sizes?

So, as has been done many times before, I am designing an AI that can play Snake as effectively as possible. It didn't take me long to find this extremely useful thread here: How to find a safe path ...
0
votes
1answer
48 views

Steering constantly turning in circles

I've been working on a fish system in a compute shader but bugs have been drowning me. The latest bug had me strip almost all the functionality to track down: Fish keep turning in circles. It starts ...
0
votes
1answer
886 views

Unity3D: AI follow player script for prefab enemy?

So I am having an issue, I have an enemy prefab that is created when the new wave happens(think of Nazi Zombies from Call of Duty, same system) but every script I have found that deals with ai ...
0
votes
3answers
106 views

Can I speed up “potential fields” pathfinding when it's working on a large grid?

I'm looking to implement a pathfinding algorithm that will allow me to throw hundreds of spiders at the players in my grid-based game. I can implement this with A*, but I'm worried that that algorithm ...
4
votes
3answers
277 views

RTS Unit AI: When to let the unit stop (due to local avoidence)

I am developing an RTS-like game, that have units that move and attack. I implemented path-finding and local-avoidance. One problem is when multiple units being ordered to the exact same position, ...