Jev Self-Driving Sim
A 2D browser driving simulation whose car turns what its sensors see into a JSON state and asks Jev four typed questions about every decision tick.
A 2D browser driving simulation whose car turns what its sensors see into a JSON state and asks Jev four typed questions about every decision tick.
Roughly every 200 ms the page turns what its sensors see into a JSON state with ego, lanes, road and pedestrian context and posts it to its own server, which sends one request with four questions: lane_action and speed_action as choices, hazard as a 0-3 score and pedestrian_yield as a noul. Code gates the answers before the car moves.
Decide the lane maneuver for the next second, changing lanes only when the target lane exists, is clear and has no closing vehicle behind.
The state is the sensor view: ego position, speed and stopping distance, the current lane and adjacent lanes with their clearance, objects ahead, and any pedestrian in the path. Every tick asks all four questions in one request.
Rate the overall collision hazard for ego right now, given everything in the state.
The state is the sensor view: ego position, speed and stopping distance, the current lane and adjacent lanes with their clearance, objects ahead, and any pedestrian in the path. Every tick asks all four questions in one request.
Is a pedestrian on the road or about to enter ego's lane within stopping distance, so ego must stop and yield?
The state is the sensor view: ego position, speed and stopping distance, the current lane and adjacent lanes with their clearance, objects ahead, and any pedestrian in the path. Every tick asks all four questions in one request.
The browser simulation describes ego, the lanes, objects ahead and pedestrians as a JSON state on each decision tick.
The page posts the state to its own server, which adds the TypeSafe credential and asks the four typed questions together.
Code ignores a low-confidence lane change, lets a strong yield answer override speed, and forces at least a slowdown when the hazard score is severe.
The car applies the gated action, scales the speed step by the elapsed time, and waits roughly 200 ms before the next tick.
All four judgments ride in one speculative request and the driving behaviour comes from confidence gates rather than a generated plan, so a slow or unsure Jev produces a gentler action instead of a broken simulation. Speed changes also scale with the time since the previous answer, so a faster model does not brake harder than a slow one.