Duangduean Studios

AI Lab

Play with the logic.

Small interactive experiments that reveal how game AI works. Change an input, watch the result and discover why the bot made its move.

Free to try. No sign-in, API key or AI credits. Experiment inputs stay in your browser.

Experiment 01 · Pathfinding

Help the bot find a way.

Click squares to add or remove walls, then run the search. Breadth-first search explores neighbouring cells and finds a shortest route when one exists. This is a game AI algorithm, not a learning model.

S is the start. G is the goal. Dark squares are walls.

Blue = explored · Orange = final route. Every step costs the same; diagonal movement is disabled.

Experiment 02 · Enemy decisions

What should the enemy do?

Change the situation to explore a simple priority-based game AI: retreat when critically hurt and threatened, patrol without sight of the player, otherwise chase or attack. These are visible rules, not a chatbot.

Current decision

Chase

The player is visible but outside the 4-metre attack range. Close the gap.

Understand the search behind the animation

Learn why breadth-first search finds a shortest route on this grid, what the explored cells mean and when another algorithm is a better fit.

Read the interactive pathfinding guide →
AI Lab | Interactive Game AI Experiments · Duangduean Studios