The Robotaxi Zoox application is a persistent Pygame window that stays open across multiple algorithm runs and map changes. You select a map once at startup, then run any number of search algorithms back-to-back — each one animates the taxi’s route, shows a results modal, and returns you to the same live window so you can immediately try another algorithm or swap in a different map without restarting the program.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Juan-Carlos-Cruz/robotaxi-zoox/llms.txt
Use this file to discover all available pages before exploring further.
Application layout
The window is divided into three distinct regions that share the same surface at all times.Header bar
The header bar spans the full width of the window at the top. It displays the application title Robotaxi Zoox on the left, with the currently loaded map filename shown below it. On the right side of the header are two action buttons:- Ambiente On/Off — toggles background ambient music on or off. When the audio subsystem is unavailable the button reads Ambiente N/D and has no effect.
- Cambiar mapa — opens a native file dialog that lets you pick a different
.txtmap frommapas/test/without closing the application. The current algorithm selection and animation state are reset when a new map loads.
Map panel (left)
The map panel occupies the large area on the left side of the window below the header. It renders the animated city grid produced by theVisualizador. Each cell of the grid is drawn as one of several tile types:
- Road tiles — traversable street cells, oriented according to the connectivity of neighboring cells.
- Building tiles — impassable wall cells rendered as city buildings.
- Traffic tiles — high-traffic cells (
FLUJO_ALTO) drawn with a stoplight and a warning marker; these cells have a movement cost of 7. - Start marker — a green pin labeled Inicio on the taxi’s starting cell.
- Destination marker — a yellow pin labeled Meta on the goal cell.
- Passenger sprites — passenger characters rendered on each pickup cell that disappears once the taxi passes through it during animation.
Algorithm panel (right)
The right-side panel contains the algorithm controls:- Status message — a card near the top of the panel showing the current application state (e.g., “Mapa cargado: Prueba1.txt”, “Animando A…”*).
- Category buttons — two side-by-side buttons to choose a search family:
- No informada — reveals BFS (Amplitud), UCS (Costo uniforme), and DFS (Profundidad).
- Informada — reveals Greedy (Avara) and A*.
- Algorithm sub-buttons — appear below the category buttons once a category is selected. Click any one to run that algorithm immediately.
Running an algorithm
Select a map at startup
When the application launches a native file dialog opens automatically. Navigate to
mapas/test/ and select any .txt map file. The map is parsed and rendered in the left panel before the main loop begins.Choose a search category
In the right panel click either No informada or Informada. The active category button highlights in blue and the matching algorithm sub-buttons appear below it.
Click a specific algorithm
Click one of the algorithm buttons — for example Amplitud for BFS, or A* for the A-star search. The search runs immediately and the status bar updates to “Ejecutando …”.
Watch the animation
The taxi sprite animates along the solution path one cell at a time. A cyan trail marks the visited route. Sound effects play as the taxi moves: a driving engine loop plays throughout, a horn sounds when the taxi enters a passenger cell, and a different horn sounds when it crosses a high-traffic cell.
Review the results modal
When the animation finishes the driving sound stops, a finish jingle plays, and a modal dialog appears over the map displaying the search metrics. Click the Cerrar button, press the × in the top-right corner of the modal, or use a keyboard shortcut to close it.
Results modal
After each completed animation a modal dialog presents the metrics recorded by_lineas_resultado in runner.py. Every field reflects the search algorithm’s execution — not the animation.
| Field | Description |
|---|---|
| Nodos expandidos | Total number of states that were dequeued and explored before the solution node was found. |
| Profundidad | Depth of the solution node in the search tree — equivalently, the number of moves from start to goal. |
| Pasos del camino | Total number of cells in the solution path, including the starting cell. This equals depth + 1. |
| Costo total | Accumulated movement cost along the path. Standard road cells cost 1 per move; FLUJO_ALTO (high-traffic) cells cost 7. |
| Tiempo de búsqueda | Wall-clock time the search algorithm took to run, measured in milliseconds using time.perf_counter. |
| Heuristica (h) | The final heuristic value at the goal node. Only shown for informed algorithms (Avara and A*). |
The reported search time captures only the algorithm’s computation. The taxi animation runs afterward as a separate loop driven by
ANIMATION_DELAY_MS and its duration is never added to this figure.Keyboard shortcuts
When the results modal is open the following keys close it instantly without requiring a mouse click:| Key | Action |
|---|---|
Esc | Close the modal |
Enter | Close the modal |
Space | Close the modal |
Window resizing
The window is fully resizable at runtime. Drag any edge or corner to change its dimensions. The layout engine recalculates the header, map panel, algorithm panel, and modal positions on every frame using_actualizar_layout, so the interface adapts immediately to the new size.
A minimum size is enforced: if the window is dragged smaller than 1180 × 760 pixels the VIDEORESIZE event handler clamps both dimensions back to those minimums before applying the resize.
Configuration constants
The following values fromapplication/config.py control the window and animation behavior:
| Constant | Value | Description |
|---|---|---|
WINDOW_SIZE | (1400, 900) | Default window dimensions in pixels at launch. |
ANIMATION_DELAY_MS | 260 | Milliseconds the taxi spends animating each single-cell move. |
PANEL_WIDTH | 340 | Fixed width of the right-side algorithm panel in pixels. |