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.
ejecucion.py provides two functions that sit between the UI and the raw search implementations. ejecutar_algoritmo is a unified dispatcher that looks up a string algorithm name in ALGORITHM_CONFIG, selects the correct search module (busqueda_informada or busqueda_no_informada), and fires it against a Grid. imprimir_resultado is a companion reporter that formats and prints every metric from a result dict to the console, including optional fields such as search time and heuristic value.
Import
ejecutar_algoritmo
nombre in ALGORITHM_CONFIG, resolves the search type and mode, then delegates to the appropriate search function. For informed algorithms it passes grid.inicio, grid.destino, and grid.pasajeros directly. For uninformed algorithms it wraps grid.inicio in a Node and converts grid.pasajeros to a frozenset before calling busqueda_no_informada.
The algorithm key as registered in
ALGORITHM_CONFIG. Must be one of 'a_estrella', 'avara', 'amplitud', 'costo', or 'profundidad'. Raises KeyError if the key is not found.A fully constructed map object with
grid.inicio, grid.destino, and grid.pasajeros set. Produced by Grid(leer_mapa()).ALGORITHM_CONFIG mapping
The dispatcher resolves each human-readable name to a (search_type, mode) tuple defined in application/config.py:
nombre key | Search type | Mode passed to search function |
|---|---|---|
'a_estrella' | 'informada' | 'a_estrella' |
'avara' | 'informada' | 'avara' |
'amplitud' | 'no_informada' | 'bfs' |
'costo' | 'no_informada' | 'ucs' |
'profundidad' | 'no_informada' | 'dfs' |
Return value
Returns thedict produced by the underlying search function, or None if no solution exists. See Uninformed Search and Informed Search for full result key documentation.
imprimir_resultado
costo, pasos, camino, nodos_expandidos, and profundidad. Conditionally appends tiempo_busqueda_ms and heuristica if those keys are present in the result dict.
A result dict as returned by
ejecutar_algoritmo. Must contain costo, camino, nodos_expandidos, and profundidad. May optionally contain tiempo_busqueda_ms (or the legacy key tiempo) and heuristica.imprimir_resultado checks for both 'tiempo_busqueda_ms' and the legacy key 'tiempo' when printing search time, so results produced by older code paths are handled gracefully.Example console output
heuristica is present (informed search results), an additional line is appended: