Mode: Click grid to add points
Iteration: 0
Points: 0
Number of Clusters (K) 3
Status: Waiting for points
Centroids Placed: 0 / 3
Converged: No
1 Physical Maze
2 4K State Space
3 4T State Space
4 T State Space
5 Abstract Graph
6 Comparison

1. Physical Maze Grid

We begin with a physical grid representation of the environment. The maze contains traversable corridor cells, black wall obstacles, a starting location S, and a goal location G.

Grid Size: 15 × 11
Total Grid Cells: 165 cells
Traversable Cells (K): 70
In a physical grid, search algorithms must explore cell-by-cell. For large grids, this creates a massive search space. Can we abstract this environment?

2. Low-level State Space (4K)

At the grid-cell level, a robot navigating the maze must track both its precise grid position and its current orientation (facing North, East, South, or West):

State = (Grid Point, Orientation)
Grid Points (K): 70
Orientations: 4 (N, E, S, W)
State Space Size: 280
Test Low-Level Transitions:
State-Action Transition Log:

3. First Abstraction — 4T State Space

A navigation decision is only needed at turning points, corners, dead-ends, the start (S), or the goal (G). Intermediate grid cells along straight corridors are abstracted away.

State = (Turning Point, Orientation)
Turning Points (T): 25
Orientations: 4
State Space Size: 100
State space is reduced from 4K (280) to 4T (100) states. We have removed intermediate grid points, but we still retain orientation because it affects steering.

4. Second Abstraction — T State Space

Instead of low-level steering, we allow abstract actions to move directly from one turning point to the next. Orientation is implicitly handled by the actions and removed from the state.

State = Turning Point
Turning Points (T): 25
State Space Size: 25
Test Abstract Action Transitions:
S
Abstract Transition Log:

5. Abstract Graph Construction

We connect turning points by tracing the corridors. Each abstract action represents a direct path between nodes, with the cell distance as the transition cost.

Original Space: 280 states
Abstract Space: 25 states
Total Reduction: 91%
The dynamically derived abstract graph consists of:
• Nodes: Turning points (Start, Goal, Corners, Intersections).
• Edges: Corridors between nodes.
• Cost: Cell distance along each corridor (edge weight).

6. Side-by-Side Comparison

Compare the initial representation and state space with the abstracted representation.

Initial Representation Abstract Representation
Every traversable location matters Decision points matter
State = location + orientation State = decision point
Forward / Turn Left / Turn Right Move N / E / S / W
280 states
(4T or 4K states)
25 states
(T or J states)
Many small transitions One transition between decision points
State Space Size Reduction:
0%
1 Puzzle Setup
2 State Representation
3 Actions & RESULT
4 Search Tree
5 Reachability Test

1. 8-Puzzle Setup

The standard 8-puzzle contains 8 numbered tiles and 1 empty position (blank space '_') on a 3 × 3 grid. The target is to rearrange the tiles from their initial arrangement to the goal arrangement.

Grid Size: 3 × 3
Tiles: 1 - 8
Blank Position: 1
A state in the 8-puzzle is a single, complete configuration of tiles and the blank. Moving a tile changes the puzzle state.

2. State Representation

A state is stored as a 9-element tuple read row by row, with 0 for the blank. How many different tuples are there? Build one yourself: Clear the board, then place pieces into the squares in order.

state = (7, 2, 4, 5, 0, 6, 8, 3, 1)
Pieces left to place:
Square 1 has 9 choices, square 2 has 8 left, … the last square has 1. So there are 9 × 8 × … × 1 = 9! = 362,880 arrangements. Each one is a different state, numbered here from 1 to 362,880.

3. Actions & Transition Model

The transition model defines which actions are possible in a state, and the resulting state after applying an action: RESULT(s, a) = s'. In this puzzle, we define actions from the perspective of moving the blank space.

Move Blank Action Model:
Blank
Transition Log RESULT(s, a):

4. Search Tree

The full tree to depth 2 is drawn; run an algorithm to see the order it visits the nodes.

Start: Speed
Initialize search...
Frontier1
Reached1
Expanded0
Generated1
BFS Solution: Searching...
Step through or click Auto…
Moves: - · Optimal: - · Generated: -

5. Reachability Test

Read the tiles row by row (skip the blank) and count inversions: pairs where a larger tile comes before a smaller one. A goal is reachable from s0 only if both counts are even or both are odd.

Swapping two tiles changes the inversion count by an odd number, so it always flips reachable ↔ unreachable. That is why exactly half of the 9! arrangements are reachable.
Start Preset
Agent Architecture
Speed
Interactive: Click room top to toggle Dirt | Click floor to place Robot
Manual Controls (Room A) Direct Actions
Performance Score & Metrics (Room B) Live Score
Performance Score: 0.0
Rooms Cleaned: 0 / 2
Movement Actions (L/R): 0
Total Actions: 0
Task Complete (Clean): No
Agent Stopped (NoOp): No

Truth Table & Model Counter

4-Step CNF Transformation

Propositional Formula Studio

Enter any propositional sentence using standard syntax: & (AND), | (OR), ~ (NOT), >> (IMPLIES), <=> (BICONDITIONAL).

Bayesian Network Workbench

Click any node on the DAG to toggle evidence: True → False → Unobserved. Posteriors update instantly via exact enumeration.

Marginal Posteriors:
Rejection Sampling Estimate:
Likelihood Weighting Estimate:

Monte Carlo Sampling Visualizer

Simulate stochastic sampling for query P(Burglary | JohnCalls=True, MaryCalls=True) (Ground Truth = 28.42%).

▲ MAX
▼ MIN
● Chance
✂ Pruned (α ≥ β)
Search Algorithm
Tree Preset
Step 1 of 1
Animation Speed
Initializing search tree...
Nodes Evaluated: 0
Nodes Pruned (Saved): 0
Active [α, β] Window: α=-∞, β=+∞
AI Opponent Settings Live AI Mind
AI Algorithm
Turn Order
AI Reasoning & Decision Inspector:
Make your move on the board to watch the AI evaluate optimal branches in real time.
States Searched by AI: 0
Search Computation Time: 0.0 ms
AI Minimax Utility Score: 0

Monte Carlo Tree Search (MCTS) Playout Simulator

Simulate self-play rollouts and inspect the balance between Exploitation (win rate) and Exploration (UCB1 formula bonus).

Exploration Constant (C in UCB1 formula) 1.41
\text{UCB1}(n) = \frac{U(n)}{N(n)} + C \sqrt{\frac{\ln N(\text{parent})}{N(n)}}
Root Total Visits (N): 0 Root Total Wins (U): 0

Alpha-Beta Move Ordering & Search Complexity Benchmark

Demonstrates how optimal move ordering reduces the effective branching factor from \(b\) to \(\sqrt{b}\), allowing search to go twice as deep.

Search Depth Plies (\(d\)) 6
Algorithm / Ordering Strategy Theoretical Complexity Evaluated States (\(b=4, d=6\)) Pruning Efficiency
Pure Minimax (No Pruning) \(O(b^d)\) 4,096 0% (Baseline)
Alpha-Beta: Best-Case Move Ordering \(O(b^{d/2}) = O((\sqrt{b})^d)\) 64 64.0× Faster
Alpha-Beta: Random Move Ordering \(O(b^{3d/4})\) 512 87.5% Pruned
Alpha-Beta: Worst-Case Move Ordering \(O(b^d)\) 4,096 0% Pruned (No cutoffs)
Key Takeaway: In tournament game engines (e.g. Chess), techniques like killer moves, history heuristics, and iterative deepening with transposition tables are used specifically to ensure moves are examined close to optimal order!