# AI-Powered

Artificial intelligence is programming that allows certain characters in a video game, such as non-playable characters (NPC’s), and enemies, to act in a way that feels as if they were controlled by a human, or were acting with a mind of their own. AI is used to make games feel more immersive.

If you’ve ever played the classic game Pacman, then you’ve experienced one of the most famous examples of early AI. As Pacman tries to collect all the dots on the screen, he is ruthlessly pursued by four different colored ghosts.

But they don’t just follow him; when you’re playing they seem to try and ambush the player.

How did they accomplish this?

The ghosts are programmed to know Pacman’s location, but each one is set to act a little differently in response to it.

One of the ghosts is set to wander, one is set to aggressively follow Pacman, one is set to go in the direction where Pacman is going, one is set to move randomly unless another ghost is close to catching Pacman, and the final ghost is set to follow Pacman when he’s far away, but go to a specific location on the map when he’s close.

These four behaviors make these ghosts, even in a game from 1980, appear to have a will of their own. They feel alive. And that is the purpose of AI in video games.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bitsniper-io.gitbook.io/bitsniper/bitsniper-or-the-game/ai-powered.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
