Skip to main content
100%

Eloquent JS: Chapter 7 (project)

✓ Published1🌍 Public
Eemberix@gmail.com
Last edited Apr 9, 2021
Created on Apr 6, 2021

This example demonstrates a simulated delivery robot navigating a network of roads connecting locations in a village. It shows three different robot strategies—random movement, a fixed mail route, and goal-oriented pathfinding—and measures their efficiency by running many simulated parcel-delivery tasks and comparing the average number of steps taken. The JavaScript code defines a graph from a static list of road connections, implements a `VillageState` class to track robot position and undelivered parcels, and uses a breadth-first search (`findRoute`) for the goal-oriented robot. The simulation runs entirely in the console, with no visual output.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes