Skip to main content

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.

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.

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 .txt map from mapas/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 the Visualizador. 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.
As the taxi animates its route a cyan path trail is drawn over the visited cells, and the taxi sprite rotates smoothly to match its direction of travel.

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

1

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.
2

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.
3

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 …”.
4

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.
5

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.
6

Run another algorithm or change the map

After closing the modal the panel is fully interactive again. Click any algorithm button to run another search on the same map, or click Cambiar mapa in the header to load a different map file and start fresh.

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.
FieldDescription
Nodos expandidosTotal number of states that were dequeued and explored before the solution node was found.
ProfundidadDepth of the solution node in the search tree — equivalently, the number of moves from start to goal.
Pasos del caminoTotal number of cells in the solution path, including the starting cell. This equals depth + 1.
Costo totalAccumulated movement cost along the path. Standard road cells cost 1 per move; FLUJO_ALTO (high-traffic) cells cost 7.
Tiempo de búsquedaWall-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:
KeyAction
EscClose the modal
EnterClose the modal
SpaceClose the modal
No keyboard shortcuts are active outside the modal — algorithm selection and map loading always require a mouse click on the corresponding button.

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 from application/config.py control the window and animation behavior:
ConstantValueDescription
WINDOW_SIZE(1400, 900)Default window dimensions in pixels at launch.
ANIMATION_DELAY_MS260Milliseconds the taxi spends animating each single-cell move.
PANEL_WIDTH340Fixed width of the right-side algorithm panel in pixels.

Build docs developers (and LLMs) love