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

learn more… | top users | synonyms (1)

-2
votes
2answers
88 views

AI shooting through walls [on hold]

I made a AI shooting script for my new game but the problem is that the AI ignores the walls and shoots through walls. This is my ai script : #pragma strict public var rocketPrefab : Transform; ...
4
votes
1answer
144 views

AI, Pathfinding - Searching Behavior

I'm developing a top-down 2D game mostly based off a tilemap/grid. The player will be able to build structures on this grid while other objects like vehicles will move around freely. I've been working ...
1
vote
5answers
112 views

How to calculate move while avoiding deep copy

Suppose in a turn-based game, I have an object holding the current status of the game (like players, board information, positions of pawns, things like that). Now I want my AI to calculate the best ...
0
votes
3answers
62 views

Problems with Obstacle Avoidance steering behavior

I learned how to implement the Obstacle Avoidance steering behavior from this tutorial. The approach depicted in this tutorial (simplified) is this (note that I'm using rectangular OBBs for obstacles, ...
6
votes
3answers
127 views

Game AI Implementation

I'm very new to game development, but an experienced software engineer. As an introduction to game dev, I'm making a 2D zombie game in Python, using pygame. The game is almost done, but I still have ...
2
votes
4answers
77 views

Identifying groupings of objects

I have a cloud of objects, each with a 3D position, and I want to pick out tight groups of these objects. Specifically, I want to find all objects which form a grouping of radius r within a large ...
1
vote
2answers
86 views

GA - Genetic Algorithm for Enemy

So I'm starting a project which aims to make a good AI for my game monsters. So far I have set up the GA and got some results. There's two genes, with one chromosome each. The monster either ...
2
votes
2answers
119 views

AI and shapes in 2D Grid

I'm working on a grid- and turn-based strategy rpg. My problem is concerning finding best position for my AI to use a skill. But lets start at the beginning. My plan is to make each skill an action ...
16
votes
6answers
2k views

How do I make A* agents avoid other agents?

I'm implementing a multi agent A* algorithm on a tile map. Agents move only in the X and Y axes. I avoid collisions between them by checking where the others are when calculating paths. It works fine ...
0
votes
1answer
62 views

Path smoothing while path following

I can't find a nice way to do path smoothing while i'm following a path. I have tried this piece of code but aparently it doesn't work as suspected. The idea of how it should work is: Edge 1 (the ...
1
vote
1answer
149 views

Can a behavior tree represent the same logic as a finite state machine?

So I was just learning about Behaviour trees and I thought they're really cool. So I decided to use them in my games. But what I don't quite understand is: Short: Can everything done in an FSM, be ...
0
votes
1answer
80 views

Chess Artificial intelligence with python and pygame [closed]

I created chess game with python and pygame. Now I'm trying to make Artificial intelligence, but what is actually best way to do it? Some tips, tricks, links? Thanks
0
votes
2answers
105 views

How can I efficiently update only the entities that matter in a given frame?

I'm making a RTS, which can potentially have lots of units in one map (think Age of Empires). I'm looking for a way to update my units. I want to avoid calling a virtual Update() method every frame ...
5
votes
1answer
93 views

Must all AI states be able to react to any event?

FSMs implemented with the State design pattern are a common way to design AI agents. I am familiar with the State design pattern and know how to implement it. How is this used in games to design AI ...
1
vote
0answers
49 views

Best way to solve the game 'bricolage'

I am trying to solve the following game http://www.hacker.org/brick/ using some kind of AI. The target of this game is to finally clear the board by clicking on groups of at least 3 bricks of the same ...
0
votes
1answer
87 views

How to store and use different AI behaviours

I'm coding a space shooter on three.js (WebGL) and since the game I'm doing is rather simple, plus I want to keep controll of the structure, I'm not using a game engine. I'm using oop classes and ...
0
votes
0answers
82 views

How to implement 2D Ai Wandering with 8 - directional movement using Perspective Images in unity 4.3?

My requirement is to move a 2D characters with perspective view images has to wander in game area by choosing dynamic path and according to that the AI character has to switch the animations based on ...
4
votes
2answers
110 views

How do I calculate legal moves in a travelling board game?

I'm making a traditional roll-the-dice-and-move style board game. Players move along the white squares on the board (see image) and may move in any available direction from a junction. Players must ...
2
votes
1answer
112 views

Running state in Behavior Trees

What happens, in a behavior tree, when a priority node chooses another branch over a running branch? Small example: Priority 1: Fight Sequence: -Enemy near? -Fight! Priority 2: ...
9
votes
2answers
269 views

Dynamic thruster balancing of space ship

The space ships in my game a meant to be player-built with an arbitrary amount of thrusters attached anywhere with any rotation. I currently have some dirty code to rotate the ship to a given angle ...
4
votes
3answers
129 views

Unit turning in navmesh-based pathfinding

I'm working on an RTS game, and I'm using navmeshes for unit pathfinding. I do know how to find a general path within a navmesh, but how do you determine if the unit have enough space to turn? I ...
1
vote
1answer
94 views

How should a hive AI distribute tasks between worker drones?

I've been studying AI design—things like behavior trees and FSMs. They make sense from the perspective of deciding a specific entity's goal and action. However, the AI in my game is very ...
2
votes
2answers
171 views

How do I make a character follow behind another?

I'm creating a game in C++ using OpenGL. I want to add a character into my game who, after meeting the main player, follows the player around. The follower should position themselves directly behind ...
1
vote
0answers
15 views

Internal FSM transition from an external Raycast's results

I'm making good progress on my shooter, I've now moved onto the AI. Currently I perform a Raycast from my base Weapon class to check for impacts, and then invoke a function on the hit object after ...
7
votes
3answers
224 views

How do AI agents access information about their environment?

This might be kind of a trivial question, but I am having trouble understanding this. Would very much appreciate your help. In game development using object oriented design, I want to understand how ...
1
vote
2answers
59 views

How can I make an AI agent avoid screen edges?

I'm programming an AI agent and I want them to avoid the screen edges. I've been considering using either the obstacle avoidance or the fleeing behaviour. Do either of these make sense? How should I ...
0
votes
2answers
73 views

Negamax Checkers not working properly [closed]

I'm trying to implement negamax in my checkers game. Sometimes the IA does the appropriate move, sometimes don't. Here is my code: private int evalPawns(ArrayList<Pawn> pawns, int turn){ ...
1
vote
2answers
248 views

Understanding the Seek steering behavior

I'm currently studying steering behaviors. Have recently learned about Seek. I have a question about this. Seek is supposed to turn the agent slowly in the direction of it's target, and then move in ...
10
votes
2answers
689 views

What are the benefits of using an entity ID system?

I'm currently reading the book Programming Game AI By Example. The book mentions assigning unique ID numbers to each entity in the game. Often when entity A needs to contact entity B, A gets a ...
2
votes
2answers
123 views

Using Behavior Trees and Events together

I am beginning to work with behavior trees and am unsure how events should be handled within the tree. Lets say we have a space game where the player is dogfighting with a handful of other ships, some ...
8
votes
1answer
221 views

Finding the correct speed for AI to turn to reach goal

I have a ship that travels at max speed maxSpeed and can turn rotationSpeed degrees per second. The ship always moves in the direction it is facing which means that the faster the ship is travelling ...
4
votes
2answers
156 views

2D Enemy AI reacting to sound

I'm currently working on a 2D top-down survival game and I'm trying to figure out a good method for enemies to detect player sounds. For instance - if the player fires his gun it should play a sound ...
1
vote
1answer
106 views

Moving turret aiming at moving target

I've found this post Turret Aiming Formula on Reddit and a nice answer a while back. The solution in the answer works great for still sanding turrets but is almost unusable for moving turrets since ...
2
votes
0answers
115 views

Simulating crowds of enemies [closed]

I am wondering what would be a good way to handle enemy crowds generation and simulation. For example in a hack'n'slash game, how would one go about placing enemies and managing their movement in the ...
2
votes
2answers
245 views

techniques for an AI for a highly cramped turn-based tactics game

I'm trying to write an AI for a tactics game in the vein of Final Fantasy Tactics or Vandal Hearts. I can't change the game rules in any way, only upgrade the AI. I have experience programming AI for ...
0
votes
1answer
70 views

How do I keep enemies from clumping up into one area? [duplicate]

I am making a zombie game and as I was making it I noticed the zombie AI starts to clump up into one mega zombie in one area. I was wondering how I could keep the zombies from doing that and instead ...
0
votes
3answers
321 views

How do I write a “Connect Four” AI?

I've made a Connect Four game. The first move is made by the player and the second by the computer. Currently, the computer moves randomly; its moves are generated by C++'s random number generator ...
6
votes
2answers
390 views

“Line of sight” path across navigation mesh

I want to calculate the line of sight in a navigation mesh. Consider the image below, the yellow line is the result of only A* and the red line is the result of a line of sight" algorithm that uses ...
5
votes
3answers
229 views

How to do a genetic algorithm's chromosome which controls movements

First I would like to inform you that I'm french and 15 so my english is not very good. I've read some articles about genetic algorithms (GA) and since I discovered the HTML5's canvas element, I can ...
-1
votes
2answers
184 views

How do I make a 2D platformer AI aware of its allies?

I'm trying to develop a 2D platformer AI that is aware of its buddies and tries to not overlap with them. However, I always end up with an "snake": I dont want them to be so robotic, but instead ...
0
votes
0answers
25 views

how to move object using angle (sin, cos, acrtan) [duplicate]

How to move enemy toward player using angle? I plan is to find angle between two points(player and enemy) and move enemy using that angle. find angle between player and enemy. double xDiff = ...
1
vote
1answer
116 views

Slow Update to improve performance?

For my enemy AI, I only need decision making to be done every second or every half second. Would it make a meaningful difference if I didn't run the analyzing method in the Update, but rather invoked ...
2
votes
2answers
88 views

Developing AI for Zatacka

I am trying to develop a stronger AI for the popular game, Zatacka. The basic aim of the game is to survive the longest. It's like the TRON game, but the characters can only turn smoothly, instead of ...
0
votes
1answer
123 views

How could I control an air hockey 's AI paddle?

I am making an air hockey game on Android with Box2D and libgdx. For the manual control, I just use the MouseJoint and it works perfectly. However, for the AI control, there is a problem: I've made a ...
1
vote
2answers
66 views

AI movement is fragmented when following player

I'm making a 2D game with two spaceships flying around and shooting at each other. One is controlled by the player, the other by the AI. Currently, I have the AI always try to get inside a certain ...
0
votes
1answer
109 views

How do I implement following behavior with a state-based AI? [closed]

I'm making a 2D game with two spaceships flying around shooting each other. One spaceship is controlled by the user, the by an AI. I want to use a simple Finite State Machine (FSM) for the AI. I'm ...
8
votes
3answers
583 views

Can I jump from A to B?

I'm making some rudimentary AI for my side-scroller and I need to know whether an AI unit can reach point B from point A simply by taking a jump. Flight trajectory of my characters is a bit unusal as ...
5
votes
4answers
565 views

Can Neural Network play tic tac toe? Is this have any common sense?

I'm thinking about theoretical possibility of playing tic tac toe by neural net. Is this have any common sense? Let's consider tic tac toe which contains 3 rows and 3 cols (it's 9 cells). Ok, then the ...
7
votes
3answers
282 views

How to take into consideration gravity when moving AI

I'm making a 2D game. There is currently a helicopter flying around, controlled by the player. It's controlled using the arrow keys: UP, LEFT and RIGHT. It's speed along the y axis is dy, and speed ...
0
votes
1answer
67 views

Integer linear program solver based AI

Is Integer Linear Programming a viable solution for a turn based game AI? My current AI solution uses an ILP solver. If you are unfamiliar with ILP, it uses a collection of Booleans to find most ...