Hot answers tagged

241 votes

Is it unethical to make a game AI that is secretly non-competitive?

Game AIs are almost always non-competitive, because if the AI would really try its hardest to win, it would often be unbeatable. An AI is not bound to human limitations like reflexes, accuracy, ...
Philipp's user avatar
  • 119k
79 votes
Accepted

Why use convex polygons and not concave ones in path-finding?

A convex polygon has a very nice property: The shortest path between any two points in the polygon, or anywhere on its edges, is just the straight line between those points, and that line segment lies ...
DMGregory's user avatar
  • 134k
68 votes

How to make AI detect a target behind a wall, who is only partially exposed?

This isn't common in all shooter games, but some do go to this level of detail. In Splinter Cell games, for instance, AI can detect Sam's individual body parts. When an AI is performing a detection ...
DMGregory's user avatar
  • 134k
54 votes
Accepted

Why is reinforcement learning not widely adopted as an AI tool for agents in well-known games?

At a very high level: reinforcement learning solves a different problem than the one game AI programmers are typically trying to solve. It's great if you want to make an opponent that's good at ...
DMGregory's user avatar
  • 134k
50 votes

Efficiently pathfinding many flocking enemies around obstacles

This sounds like a use case for Flow Fields. In this technique, you do a single pathfinding query outward from your player object(s), marking each cell you encounter with the cell you reached it from....
DMGregory's user avatar
  • 134k
47 votes

Is it unethical to make a game AI that is secretly non-competitive?

A game's AI is a part of a game's overall design. At the end of the day, the AI you create needs to complement the game design. If your game is designed around creating a challenging, competitive ...
Nicol Bolas's user avatar
  • 26.1k
42 votes
Accepted

What should be created first in a video game?

The first step is to create a minimum viable product. A MVP is the absolute minimum which can be considered a playable game. It doesn't need any graphics yet except for some placeholders. It should ...
Philipp's user avatar
  • 119k
35 votes

How feasible is it to integrate a personality system such as the MBTI into a game?

Firstly, you should know that the Myers-Briggs Type Indicator is a proprietary system - if you wanted to use exactly this system in your game you'd need to license it from the foundation that ...
DMGregory's user avatar
  • 134k
34 votes
Accepted

AI for auction bids in the Monopoly game

To determine an auction bid, you need the AI to be able to estimate the value it expects to be able to earn from that property. First then, we need an estimate for how many rounds the game is likely ...
DMGregory's user avatar
  • 134k
26 votes

Is it unethical to make a game AI that is secretly non-competitive?

As a preface, I'm going to correlate ethics with cheating. If you feel cheated, you feel something unethical has happened to you. In a nutshell, to make your AI's behavior acceptable, make the ...
Tim Holt's user avatar
  • 10.3k
23 votes

How to make AI detect a target behind a wall, who is only partially exposed?

If you really want to detect any exposed part of the player, the extreme approach is to simply render the scene from the gun's perspective using replacement shaders, such as the player rendering as ...
Dave's user avatar
  • 331
18 votes

Is it unethical to make a game AI that is secretly non-competitive?

Yes. An AI should stay at the level that it was set to. A chess AI will beat all of us every time, and it's up to us to tune it to something we find enjoyable. I would never want the AI to dumb ...
Carl's user avatar
  • 425
17 votes
Accepted

Driver AI in racing game

We can say that at some level the game is following a pre-computed path. Since the tracks of the racing game are (usually) a pre-computed path anyway. Even if we are talking about generating the ...
Theraot's user avatar
  • 26.3k
17 votes

AI for auction bids in the Monopoly game

DMGregory gave you a lot of ideas on how to value property. However, your starting point should back up a bit: Design your game engine from the ground up to permit running all-AI games that simply ...
Loren Pechtel's user avatar
13 votes

How can City-sim simulate hundreds of characters?

Like so much of gamedev, the answer to how city sim games accomplish this seemingly-impossible feat is: they probably don't. They're just faking it well. ;) Sims like these will typically operate on a ...
DMGregory's user avatar
  • 134k
13 votes
Accepted

How hard to brake to perfectly smoothly reach the destination?

When an object brakes with a constant deceleration, then its velocity over time looks like this: Distance traveled is velocity multiplied with time. So the orange area in the graph above actually ...
Philipp's user avatar
  • 119k
12 votes

Is it unethical to make a game AI that is secretly non-competitive?

I would say no. You see for me games are first and foremost entertainment products. They want to deliver an experience to a specific audience. So it all depends on what experience and to what audience ...
Uri Popov's user avatar
  • 3,007
12 votes

Why is reinforcement learning not widely adopted as an AI tool for agents in well-known games?

"Artificial intelligence" in games In general, enemy agents in video games do not use machine learning. Instead they are expert systems, behavior tree, cellular automata, finite state ...
Theraot's user avatar
  • 26.3k
11 votes

AI multithreading

Implementing logic by threads is almost always a very bad idea. Multi-threaded programming is difficult! You will run into race conditions and deadlocks resulting in impossible to reproduce bugs. ...
Philipp's user avatar
  • 119k
11 votes
Accepted

How do I calculate paths for objects with limited acceleration?

I haven't worked through the full equations for this yet, but here's some visuals to help wrap our heads around the problem. It boils down to some geometry: (Car icons via Kenney) From any given ...
DMGregory's user avatar
  • 134k
11 votes
Accepted

What are the basics of implementing a Goal Oriented AI?

Planning You have a world that has some state, and the agents can do actions that affect that state. Now, you can think of the world state as a node, and the actions are the links. You would not ...
Theraot's user avatar
  • 26.3k
11 votes

Is it unethical to make a game AI that is secretly non-competitive?

Try to be competitive at a sport with your date, or with your kids. In both cases, you may end up playing that sport alone because you have not made it fun for them. The term Artificial Intelligence ...
Vaillancourt's user avatar
  • 16.3k
10 votes
Accepted

Are there well known algorithms for efficient map knowledge?

Influence maps are data structures that model various relationships with respect to their locations, and typically assume that the impact of these relationships spread outward across space and/or time....
Pikalek's user avatar
  • 12.3k
9 votes

Is it unethical to make a game AI that is secretly non-competitive?

Ultimately, the role of AI is to help produce a note-worthy, rewarding experience. Dr. Ian Lane Davis talks about this in some of his interviews, that the role of an AI is to lose convincingly. ...
Xtros's user avatar
  • 191
9 votes

Is it unethical to make a game AI that is secretly non-competitive?

The goal of your AI should not be to win, it should be to provide an enjoyable game. Part of that enjoyment is in being challenged. My approach to this in Scrabble has been two-fold: Firstly, aim ...
Graham Toal's user avatar
9 votes

If an AI is sure it is going to lose, what can it do to make the game fun for the player?

One thing you could do is give the AI an "all or nothing" response to losing. If he thinks he's going to lose, he could do something crazy like, spend all his money on the lottery. Gather ...
Millard's user avatar
  • 500
8 votes

Efficiently pathfinding many flocking enemies around obstacles

A* is not performance heavy. I would approach this situation by varying the algorithms. Do A* from time to time and in between check whether the next step is free to step onto or you need evasion. ...
D3d_dev's user avatar
  • 328
7 votes

AI multithreading

Create a thread for each player is an overkill, 5000+ threads will trash your server performance. My suggestion is to create a job queue where you put all your 5000 players state then you can launch ...
pinco's user avatar
  • 421

Only top scored, non community-wiki answers of a minimum length are eligible