Questions tagged [game-ai]

Artificial intelligence techniques applied to video games.

Artificial Intelligence in video games is often used to provide behavior for Non Playing Characters or NPCs. The topic is very broad, depending on the game type it can cover:

  • Environment Understanding
    • Visual Stimuli detection
    • Auditory Stimuli detection
    • Space analysis
  • Navigation
    • Path finding
    • Path following
    • Steering Behaviors
  • Knowledge Representation
  • Behavior Selection techniques
    • Finite State Machine
    • Fuzzy State Machine
    • Goal Oriented Action Planning
    • Behavior Tree
  • Multi-Agent communication
    • Group or Squad coordination
  • Tactics and Strategies
  • Animation selection
  • Feedback systems
  • Scripting systems

It generally does not cover topics such as machine learning and parameter optimizations. Since game designers usually want to give a specific experience to the player, we usually rely on techniques that allow designing the behavior rather than having them learned and have little to no control over the decision making.

89 questions
2
votes
3 answers

C++/OpenGL chess game program design advice

I'm making a chess game, rendered with OpenGL. I'm not looking for somebody to tell me all of the answers, I would like to figure the code out on my own, but pointing me to the right concepts is what I really need. At this point, I'm not sure where…
2
votes
3 answers

Increasing sprite position incrementally very fast without lag - Python

I'm making a PONG game for a school project using Kivy in Python. So far thanks to this forum I've made myself some AI for the NPC paddle. This is the code: if self.ball.y < self.player2.center_y: self.player2.center_y =…
Anteara
  • 729
  • 3
  • 14
  • 33
2
votes
1 answer

Implementing Wander behavior in a game

I am doing some game and now I am on the part where I am trying to implement the wander behavior for my tanks, but I can't implement it successfully. The thing is that it calculates it's position and if it's like (430,130) and using rand_floatRange…
Takarakaka
  • 279
  • 2
  • 4
  • 15
1
vote
1 answer

How to calculate the average branching factor on a given tree

Can anyone explain to me, what the value of the average branching factor is if we exclude leaf nodes when computing b? Example: I don't know how to calculate this in the right way :/ Thanks a lot
1
vote
1 answer

2 competitive AI with Minimax

Simplified Game Rules: Pawns can move once per turn. Pawns can move in 4 directions. (up, down, left, right) Pawns move on a grid like a chess board. Pawn reaching the other's row wins. Other rules can be ignored for simplicity. Evaluation…
1
vote
0 answers

How to make use of the result of an A* algorithm for a 2D game?

I am doing my first attempt at introducing pathfinding in one of my games. So far I have implemented an A* algorithm which seems to correctly find a path around a wall that I set up to the location specified according to print statements. However,…
1
vote
1 answer

Fitness Function altenatives in Genetic Algorithms for game AI

I have created a Gomoku(5 in a row) AI using Alpha-Beta Pruning. It makes moves on a not-so-stupid level. First, let me vaguely describe the grading function of the Alpha-Beta algorithm. When it receives a board as an input, it first finds all…
1
vote
0 answers

gorilla vs shark - Who would win - Resolving deadlocks in Utility theory game AI

Context: Utility theory Game AI Question: How to resolve deadlocks ? Scenario: RTS game - both sides have only one unit left in the game and no resources to build more. Consider a Gorilla and a Shark that are the only two entities who exist in a…
tcwicks
  • 495
  • 3
  • 11
1
vote
0 answers

MCTS: Monte Carlo Tree Search in Checkers

I implemented an AI playing checkers (also known as draughts) using the popular Monte Carlo Tree Search. I was inspired by this resource http://www.bailopan.net/checkers/ that does the same. Unfortunately my implementation and that implementation…
Giggioz
  • 457
  • 7
  • 21
1
vote
2 answers

Technique for making board game AIs compete against each other?

Suppose I have multiple AI programs for a particular board game, all implemented in different languages, and want to have them compete against each other without a human intermediary. How would I go about this? I imagine that this is a common…
jpl
  • 51
  • 3
1
vote
0 answers

how to understand steer force for steering behavior

I read a tutorial of how to implement Seek behavior of steering behavior.The link is here .And this is the graph to illustrate the algorithm: . I know the velocity, force, acceleration are all vector. But how come "steering" in formular "steering =…
HUSH-G
  • 21
  • 3
1
vote
0 answers

Steering Behaviors: Arrive behavior problems

I'm working on implementing steering behaviors in an OpenGL Android project of mine, but I'm having a little trouble understanding why my Arrive behavior code isn't behaving like it should. During the update loop my program calculates a steering…
RGrun
  • 350
  • 3
  • 16
1
vote
1 answer

Game AI: Pattern for implementing Sense-Think-Act components?

I'm developing a game. Each entity in the game is a GameObject. Each GameObject is composed of a GameObjectController, GameObjectModel, and GameObjectView. (Or inheritants thereof.) For NPCs, the GameObjectController is split into: IThinkNPC: reads…
Nick Heiner
  • 119,074
  • 188
  • 476
  • 699
1
vote
2 answers

Algorithm for finding spaces to attack target within move-attack area on a 2D grid game board

I'm looking for an algorithm name or implementation that can give me valid positions from a list of valid moves from which I can attack a given target. I have a 2D tile map and a hero who can move a certain number of moves and attack enemy at…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
1
vote
2 answers

Locating point on a closed path to maximize sum of distances to a sample of weighted points (Game AI)

I'm doing AI for a simple puzzled game and need to solve the following problem efficiently (less than 1 sec for the range specified since I need to do many iterations in a game). A sample of N (1 to 100,000) monsters with strength from 1 to…
neiht
  • 23
  • 1
  • 5