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

learn more… | top users | synonyms (1)

10
votes
1answer
2k views

How do I tell if my enemy can see my player?

Given a player and an enemy with position, and given the direction vector of each, how can I tell if one can "see" the other? In other words, how do I test if one position with direction is in front ...
1
vote
1answer
37 views

Implementing monte-carlo tree search in a tile based game with units

I have this simple risk-like game I would like to develop an AI for. Players move their Units on the map and a simple fight resolution is done. There is a time constraint of 100ms for each round, the ...
1
vote
4answers
104 views

How do I make sure my tic-tac-toe AI always plays to a draw?

I'm working on a little project. The aim is to play Tic-Tac-Toe against an AI, but I require that the game always results in a draw against the AI opponent. How can I implement the AI to ensure that?
0
votes
1answer
22 views

Static evaluation function for Checkers using Minimax

I have correctly implemented Minimax for my checkers AI till depth of 3 ( well at least that is what I think ). However I am confused on evaluating my game boards at depth 3 with heuristics. Currently ...
0
votes
1answer
86 views

Finding next AI move using MinMax algorithm for Checkers [duplicate]

I am currently working on a Checkers game using Unity ( human vs computer ) I am done with the base architecture of the game ie defining the rules, moves, jumps etc. I am currently stuck in ...
1
vote
2answers
69 views

Adding gravity to arrival steering behavior

I trying to write an autopilot for the classic Lunar Lander or its clones. According to this paper, the arrival behavior is exactly what I need for a soft landing. In this example, it accelerates at ...
1
vote
1answer
106 views

What kind of AI for a complex board game [Summoner Wars]

I am thinking of creating an AI for the card/board game Summoner Wars (by PlaidHat Games). It's a very nice tactical game for two players, with simple rules but quite deep. I have considered min-max ...
3
votes
2answers
142 views

Find a position within one radius, but outside other radii

I have an Object A which will attempt to stay within a certain distance of another Object B. I would like Object A to also try to stay outside a certain distance of one or more other Objects R. The ...
1
vote
1answer
103 views

Swarm Algorithms [closed]

I have been asked to deliver a presentation for my university course on ant, bee and particle swarm algorithms. Therefore I am attempting to learn more about swarm algorithms and their uses within ...
3
votes
2answers
298 views

Why should I use a list of enemies instead of an array of enemies?

I have been making 2d shooter similar to galaga using xna in C#, where the enemies (2 types) are all in rows above the player's ships, and are supposed to randomly launch attacks. I had previously ...
0
votes
1answer
139 views

Game Maker: Studio - Make objects avoid other instances of same object with A* pathfinding

I have a game where there are multiple enemies who must chase a single player. I have pathfinding set up using the GML A* pathfinding with mp_grid and a path. However, these enemies can walk on top ...
2
votes
2answers
169 views

How can I combine chasing and obstacle-avoidance in a steering-based AI?

I'm developing a top-down game in XNA with enemies that wander until they are within range of a player, at which point they begin chasing the player. This works, but I also want them to avoid ...
2
votes
1answer
80 views

What AI algorithm to use to find hidden shapes in a Battleships-like game

I'm developing a game similar to Battleships, only using different shapes. A single type of shape will be used within a game session, by both the human player and AI. There will be several objects ...
0
votes
0answers
35 views

Displaying range around a unit [duplicate]

I'm looking to highlight a set of square tiles around a unit to signify its movable range. The concept should be quite familiar to those who have experienced the Fire Emblem series of game. I have ...
0
votes
0answers
67 views

Implementing a group formation behavior

I am trying to implement a group formation behavior where all the units in my group follow a leader and maintain their position throughout. So far I am able to move them, rotate and follow the leader. ...
0
votes
2answers
173 views

Handling player and AI in a component based structure dynamically?

I'm trying to find a way to allow both input and AI to call actions of an actor in a component based structure for a 2d turn based game. The actions make use of the components. To keep the system ...
2
votes
3answers
113 views

Steering behavior using nodes

I've started rewriting some of my code (npcs, navigation and such) and I need some help with my new navigation system. Basically the way it works is: the game generates a random dungeon. For example: ...
4
votes
3answers
591 views

Find shortest path to gather items

I have a rectangular grid with obstacles and food items on certain tiles. There are also a few storage bins. Each food item gives 10 food. How can I find the shortest path that will allow me to ...
0
votes
0answers
77 views

Super Smash Brothers 64 AI

I have been playing the original SSB for close to 15 years now, and I am still amazed by the effectiveness of the AI (though by now I have to fight at least 2 level 9's for a challenge). Some of the ...
0
votes
1answer
112 views

Combining pathfinding with global AI objectives

I'm making a turn-based strategy game using Java and LibGDX. Now I want to code the AI. I haven't written the AI code yet. I've simply designed it. The AI will have two components, one focused in ...
2
votes
1answer
137 views

Event Driven Behavior Tree: deterministic traversal order with parallel

I've studied several articles and listen some talks about behavior trees (mostly the resources available on AIGameDev by Alex J. Champandard). I'm particularly interested on event driven behavior ...
1
vote
1answer
195 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 ...
1
vote
2answers
178 views

Implementig State-driven agents in an Entity-Component-System

A state-driven agent is an agent that performs an action based on its current state. The logic can be implemented through the use of a D-FSM that changes state depending on the Agent's "perception" ...
0
votes
2answers
124 views

A*Pathfinding lose target after spawning from script?

I have been using A*Path finding to enable object tracking. It works fine if I have both objects on the scene at the same time. However, if I were to use a script to spawn the seeking object ...
-2
votes
2answers
146 views

AI shooting through walls [closed]

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; ...
5
votes
1answer
196 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
132 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
144 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
206 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
86 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
123 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
144 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 ...
17
votes
7answers
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
81 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
281 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
158 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
150 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 ...
6
votes
2answers
125 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
55 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
92 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
147 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
127 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
184 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
369 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
211 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
115 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
204 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
20 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
254 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
65 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 ...