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
2answers
37 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
38 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
68 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
55 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
24 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
25 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
183 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
35 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
92 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
41 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
51 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
49 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
134 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
87 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
44 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
12 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
41 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
109 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 ...
2
votes
1answer
103 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
35 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
70 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
34 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
83 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
126 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
60 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
45 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
415 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
84 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
191 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, ...
1
vote
1answer
51 views

How would I swap a character when a player touches a collider?

I wrote a simple script to attempt to do this and I created an empty game object and applied the script to it and dragged both of my sprites into my script and I receive no errors but nothing happens ...
1
vote
0answers
55 views

C++ text based football — lookup table and AI logic help

I am trying to develop a one-player text based football game in C++ strictly in the console without graphics. I am developing the game logic here below vs the CPU and I also need to do the vice versa (...
0
votes
2answers
92 views

Pathfinding How to store data for big terrain size

I am trying to implement my own pathfinding solution in unity but cant figures out how to store data. Following is my grid class which stores height, length and neighbour tile of tile. ...
1
vote
1answer
121 views

Roguelike game: detect intent of other actors by observing their moves

In grid turn-based roguelike game, how can I detect the following scenarios: other actor is following observing actor other actor is intentionally moving to block its path Path blocking can happen ...
0
votes
2answers
177 views

How do I implement efficient collision avoidance in 100 enemies

I am developing a libgdx game. It is a top down shooter and I am trying to make a good AI. I have tried to implement A* from the AI library from libgdx and it works fine but when i have a lot of ...
1
vote
2answers
223 views

How could a NPC find items that appear randomly?

My main question is basically: What is the algorithm that CPU players use in smash bros to find items like the smash ball? I am trying to make a small ai character that will "look around" and once an ...
0
votes
1answer
129 views

Unity3D: activeSelf issues

I've been trying to script some basic AI for a Unity Roll-A-Ball game, which involves two balls collecting cubes for points (one controlled by the player and the other controlled by AI. Everything ...
0
votes
1answer
180 views

Why is my Zombie enemy not chasing the player?

I am using C++ and SFML to make a top-down Zombie shooter. For now I have a player I can move around who can shoot but I am trying to have a basic AI for a Zombie who chases the player based on player ...
0
votes
1answer
90 views

Why won't InvokeRepeating work for me?

I am designing an FPS game and scripted this shooting enemy that is supposed to shoot at the player if he is in the trigger zone once every second, but it just rapid fires and ...
3
votes
3answers
285 views

Using the Command design pattern for game AI

I'm trying to learn the Command design pattern and apply it to the game I'm working on. First I read about the general implementation, and I feel like I understand it pretty well. Now I want to know ...
0
votes
1answer
118 views

libgdx - how to make enemies not overlap

I'm currently making a roguelike shooter in libgdx to get a better understanding of the library but I recently just stumped onto a problem where enemies would overlap each other while tracking the ...
0
votes
2answers
667 views

How to represent a modular FSM for AI using ECS?

I am considering to implement AI using ECS which actually contradicts working with naive FSMs. My current idea is to have multiple components which represent the particular state an Entity that has a <...
5
votes
2answers
286 views

AI world exploration?

For one of my exams, we have to make an AI for some sandbox survival game. Well to be exact, we have been given a framework, and need to make a plugin that contains the AI logic. So far, I already ...
1
vote
1answer
117 views

Enemies overlapping

I have a simple WebGL maze game and has problem with enemies overlapping when they are going to target position. Now i'm detecting there collisions, but dont know what to do with them when they are ...
3
votes
2answers
443 views

How can I maneuver an AI pirate ship for a sea battle?

I'm trying to picture in my head what would be required to make an AI controlled enemy do the following in a top down pirate sailing game: Approach the player ship Bring player in line with port / ...
0
votes
1answer
125 views

Can you use A* to make a unit move nonspecifically?

A* is typically used to calculate the best way to move towards something, and it's quite flexible when it comes to threats, extra movement costs, and 'refuelling' on the way to something. However, if ...
0
votes
0answers
47 views

How can a arrival steering behavior ever stop?

I try to understand steering behaviors and have problems with arrival. Lets take this tutorial: https://gamedevelopment.tutsplus.com/tutorials/understanding-steering-behaviors-flee-and-arrival--...
0
votes
2answers
163 views

(unity3d) Raycast Tags: Object reference not set to an instance of an object not working!

Here is the code I have written for an AI: ...
0
votes
1answer
79 views

FixedUpdate is Being Called Less and Less Over Time…Why?

My game is still in the very early stages, but basically I have an enemy that follows the player if it can see them and will continue to follow the player for a few seconds after the player leaves its ...
0
votes
0answers
169 views

Why is the Enemy's Sprite Flipping When it Sees the Player?

So I have a method that flips an enemies sprite if depending on what direction they're moving. I also have a script that determines if it can see the player. Currently, the enemy sprite faces the ...
1
vote
1answer
107 views

NavMesh - Changing Mesh by Jumping upwards

I have been playing around with the NavMesh and I have seen that there are different situations where an agent has to change meshes. When it works: Everything seems to work alright with links, if I ...