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.

Every map in Robotaxi Zoox is a plain-text .txt file containing a rectangular grid of space-separated integers. Each integer encodes a cell type, and together the rows and columns describe the city the taxi will navigate. There are no headers, labels, or metadata — just the raw numbers. The leer_mapa() function reads any such file, strips blank lines, and converts the contents into a Python list[list[int]] that the Grid class can work with immediately.

Cell Codes

Six integer codes are recognised. Any other value is treated as a free road (cost 1).
CodeNameConstantDescription
0Free roadGrid.LIBREPassable cell, step cost 1
1WallGrid.MUROImpassable — taxi cannot enter
2StartGrid.INICIOTaxi spawn point, step cost 1
3High trafficGrid.FLUJO_ALTOPassable but congested, step cost 7
4PassengerGrid.PASAJEROPickup location, step cost 1
5DestinationGrid.DESTINOGoal cell, step cost 1

Example Map — Prueba1.txt

The default test map (mapas/test/Prueba1.txt) is a 10×10 grid. Here is its exact content:
4 1 1 1 1 1 1 1 1 1
0 1 1 0 0 0 3 0 0 0
2 1 1 0 1 0 1 0 1 0
0 0 0 0 3 0 0 0 3 0
0 1 1 0 1 1 1 1 1 0
0 0 0 0 1 1 0 0 0 5
4 1 1 1 1 1 0 1 1 1
0 1 0 0 0 1 0 0 0 1
0 1 0 1 0 1 1 1 0 1
0 0 0 1 0 0 0 0 0 1
Reading the grid from top-left (0, 0) to bottom-right (9, 9):
  • (0, 0)4 (PASAJERO): the first passenger waits in the top-left corner.
  • (2, 0)2 (INICIO): the taxi spawns here at the start of every search.
  • (5, 9)5 (DESTINO): the taxi must reach here after collecting both passengers.
  • (6, 0)4 (PASAJERO): the second passenger waits in the bottom-left area.
  • 1 cells — walls that block large corridors, forcing the taxi to navigate around them.
  • 3 cells — high-traffic intersections scattered at (1, 6), (3, 4), (3, 8), which cost-aware algorithms will try to avoid.
The two passengers at (0, 0) and (6, 0) are both near the starting column, while the destination is on the far right — so the taxi must cross the map after completing its pickups.

Built-in Test Maps

Eight ready-to-use maps ship in mapas/test/, ranging from simple layouts to complex multi-passenger scenarios:
FilePath
Prueba1.txtmapas/test/Prueba1.txt
Prueba2.txtmapas/test/Prueba2.txt
Prueba3.txtmapas/test/Prueba3.txt
Prueba4.txtmapas/test/Prueba4.txt
Prueba5.txtmapas/test/Prueba5.txt
Prueba6.txtmapas/test/Prueba6.txt
Prueba7.txtmapas/test/Prueba7.txt
Prueba8.txtmapas/test/Prueba8.txt
Calling leer_mapa() with no arguments loads Prueba1.txt as the default map.

Creating a Custom Map

You can write your own .txt map file and load it through the interface or the API. Follow these rules to produce a valid map:
  • The grid must be rectangular — every row must have the same number of columns.
  • There must be exactly one INICIO cell (2).
  • There must be exactly one DESTINO cell (5).
  • There must be at least one PASAJERO cell (4).
  • The taxi’s reachable area should be connected — isolated free-road regions that cannot be reached from INICIO are silently ignored by the search.
Here is a minimal working 4×4 custom map:
1 1 1 1
1 2 4 1
1 0 5 1
1 1 1 1
This map has one taxi start at (1, 1), one passenger at (1, 2), and the destination at (2, 2), surrounded by walls on all outer edges.
If the map file contains no INICIO cell, grid.inicio will be None and any search algorithm will crash immediately when trying to build the initial node. Likewise, a missing DESTINO means the goal condition can never be satisfied and the search will exhaust the entire state space before returning None. Always validate your map file before running a search.

Loading a Map Programmatically

Use leer_mapa() to parse the file and pass the result directly to Grid:
from mundo import Grid, leer_mapa

# Load the default map (Prueba1.txt)
matriz = leer_mapa()

# Or specify a custom path
matriz = leer_mapa('mapas/test/Prueba3.txt')

# Build the grid model
grid = Grid(matriz)

print(grid.filas, grid.columnas)  # e.g. 10 10
print(grid.inicio)                # e.g. (2, 0)
print(grid.destino)               # e.g. (5, 9)
print(grid.pasajeros)             # e.g. [(0, 0), (6, 0)]
leer_mapa() returns None if the file does not exist, is empty, or cannot be parsed — check for None before constructing a Grid to avoid attribute errors downstream.

Build docs developers (and LLMs) love