Every map in Robotaxi Zoox is a plain-textDocumentation 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.
.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).| Code | Name | Constant | Description |
|---|---|---|---|
0 | Free road | Grid.LIBRE | Passable cell, step cost 1 |
1 | Wall | Grid.MURO | Impassable — taxi cannot enter |
2 | Start | Grid.INICIO | Taxi spawn point, step cost 1 |
3 | High traffic | Grid.FLUJO_ALTO | Passable but congested, step cost 7 |
4 | Passenger | Grid.PASAJERO | Pickup location, step cost 1 |
5 | Destination | Grid.DESTINO | Goal 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:
(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.1cells — walls that block large corridors, forcing the taxi to navigate around them.3cells — high-traffic intersections scattered at(1, 6),(3, 4),(3, 8), which cost-aware algorithms will try to avoid.
(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 inmapas/test/, ranging from simple layouts to complex multi-passenger scenarios:
| File | Path |
|---|---|
| Prueba1.txt | mapas/test/Prueba1.txt |
| Prueba2.txt | mapas/test/Prueba2.txt |
| Prueba3.txt | mapas/test/Prueba3.txt |
| Prueba4.txt | mapas/test/Prueba4.txt |
| Prueba5.txt | mapas/test/Prueba5.txt |
| Prueba6.txt | mapas/test/Prueba6.txt |
| Prueba7.txt | mapas/test/Prueba7.txt |
| Prueba8.txt | mapas/test/Prueba8.txt |
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
INICIOcell (2). - There must be exactly one
DESTINOcell (5). - There must be at least one
PASAJEROcell (4). - The taxi’s reachable area should be connected — isolated free-road regions that cannot be reached from
INICIOare silently ignored by the search.
(1, 1), one passenger at (1, 2), and the destination at (2, 2), surrounded by walls on all outer edges.
Loading a Map Programmatically
Useleer_mapa() to parse the file and pass the result directly to Grid:
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.