Seats are not checked
A party of five can be sent a four-seat sedan.
Impact: 1,140 groups in October waited for a second car or cancelled.
All problemsData & Systems
Build a matcher that sends ride requests to drivers from a one-page spec.
Your mission · Build from a spec
Hopwell's current matcher sends the nearest car and checks nothing else. In October it sent 1,140 groups to cars without enough seats, and 260 drivers were sent on trips that ran past their shift. Hopwell launches in a third city on February 2 and wants a matcher that follows the rules first.
A party of five can be sent a four-seat sedan.
Impact: 1,140 groups in October waited for a second car or cancelled.
A driver can be sent a trip that ends after their shift.
Impact: 260 drivers worked unpaid overtime or declined the trip.
Every match fails with NotImplementedError.
Impact: The new matcher cannot go live before February 2.
Edit the components marked “Your work”. The other components show where your changes fit.
| Field | Type | Notes |
|---|---|---|
driver | non-empty string | Driver ID, for example "H104". |
position | [x, y] | Grid point at minute 0. |
seats | integer >= 1 | Riders that fit. |
shift_end | integer >= 0 | Last minute the driver may still carry a rider. |
| Field | Type | Notes |
|---|---|---|
rider | non-empty string | Rider ID, for example "R-5501". |
time | integer >= 0 | Minute the request arrives. Never goes down. |
pickup | [x, y] | |
dropoff | [x, y] | |
party | integer >= 1 | Riders in the group. |
| Field | Type | Notes |
|---|---|---|
rider | string | |
driver | string or null | null when no driver can take the ride. |
pickup_at | integer | Minute the car reaches the pickup. Absent when unmatched. |
dropoff_at | integer | Minute the rider is dropped off. Absent when unmatched. |
config/market-settings.yaml The matching settings for one market: block size, travel speed, the tie rule and the shift-end rule.# Matching settings, Hopwell north market (since 2026-03-14). grid_block_meters: 400 minutes_per_block: 1 tie_break: driver_id_string shift_end_rule: dropoff_at_or_before max_party: 7
samples/morning-rush.json Four drivers and seven requests from a morning rush. Arguments for Preview.[
{
"drivers": [
{
"driver": "H104",
"position": [
0,
0
],
"seats": 4,
"shift_end": 240
},
{
"driver": "H117",
"position": [
6,
-3
],
"seats": 4,
"shift_end": 90
},
{
"driver": "H122",
"position": [
-5,
4
],
"seats": 6,
"shift_end": 240
},
{
"driver": "H131",
"position": [
2,
8
],
"seats": 4,
"shift_end": 240
}
]
},
[
{
"rider": "R-5501",
"time": 0,
"pickup": [
1,
1
],
"dropoff": [
9,
1
],
"party": 1
},
{
"rider": "R-5502",
"time": 2,
"pickup": [
5,
-2
],
"dropoff": [
5,
30
],
"party": 2
},
{
"rider": "R-5503",
"time": 4,
"pickup": [
0,
6
],
"dropoff": [
-8,
6
],
"party": 5
},
{
"rider": "R-5504",
"time": 6,
"pickup": [
2,
2
],
"dropoff": [
2,
12
],
"party": 1
},
{
"rider": "R-5505",
"time": 9,
"pickup": [
9,
2
],
"dropoff": [
14,
2
],
"party": 2
},
{
"rider": "R-5505",
"time": 10,
"pickup": [
9,
2
],
"dropoff": [
14,
2
],
"party": 2
},
{
"rider": "R-5506",
"time": 15,
"pickup": [
-1,
0
],
"dropoff": [
-1,
9
],
"party": 7
}
]
]samples/morning-rush-expected.json What the spec says the rush returns. R-5505 is unmatched at minute 9 and matched when it asks again at minute 10.[
{"rider": "R-5501", "driver": "H104", "pickup_at": 2, "dropoff_at": 10},
{"rider": "R-5502", "driver": "H117", "pickup_at": 4, "dropoff_at": 36},
{"rider": "R-5503", "driver": "H122", "pickup_at": 11, "dropoff_at": 19},
{"rider": "R-5504", "driver": "H131", "pickup_at": 12, "dropoff_at": 22},
{"rider": "R-5505", "driver": null},
{"rider": "R-5505", "driver": "H104", "pickup_at": 11, "dropoff_at": 16},
{"rider": "R-5506", "driver": null}
]logs/matcher-2026-10-21.log The old matcher on one morning: a group sent a four-seat car, a trip past a shift end, and a tie settled by online order.2026-10-21T08:02:11Z match rider=R-4410 party=5 driver=H088 seats=4 result=second_car_needed 2026-10-21T08:14:37Z match rider=R-4471 party=1 driver=H131 shift_end=08:30 dropoff_eta=08:52 result=driver_declined 2026-10-21T08:14:52Z match rider=R-4471 party=1 driver=H122 result=ok wait_minutes=11 2026-10-21T08:31:05Z match rider=R-4502 party=2 driver=H104 distance_blocks=3 note="H117 at 3 blocks too, picked by online order"
metrics/match-failures-2026-10.csv Matches each week in October that failed on seats or on the shift end, and riders who cancelled after a match.week,rides,too_few_seats,past_shift_end,riders_cancelled_after_match 2026-10-05,287400,262,58,3105 2026-10-12,290100,281,66,3220 2026-10-19,288900,301,71,3388 2026-10-26,291700,296,65,3290
TASK-201 Read docs/spec.md and plan the pieces Reported by Kofi (marketplace)
Expected NOTES.md lists what you keep for each driver and the order you will build the pieces in.
Actual The input checks and the grid distance work, but nothing picks a driver, and eligibility and matching are stubs.
TASK-202 Core: send one request to the nearest driver Reported by Kofi (marketplace)
Expected R1 goes to D1 with pickup_at 3 and dropoff_at 11.
Actual Every match fails with NotImplementedError: "Implement RideDispatcher.match using the request contract".
TASK-203 Then busy drivers, seats and the shift end, then ties and unmatched riders Reported by Lucia (operations)
Expected Every result matches the expected file. With a shift end of 35, H117 cannot take R-5502, and H131 takes it instead.
Actual Until can_take and match are built, every request fails with NotImplementedError from rides/services/.
TASK-204 Write down anything you chose to leave out or would do next Reported by Dara (head of operations)
Expected A short list of what the matcher does not handle yet and what you would build next, with a reason for each.
Actual NOTES.md has no entry.
Scores use evidence from your session. A short or incomplete session may not provide enough evidence for every skill. See a sample scorecard
Build the matcher for a ride service. Drivers sit on a city grid with seats and a shift end, and each ride request goes to the nearest driver who can take it. The spec is one page. Start with a working core and grow it. Use the AI assistant however you like, and tell me your plan before you ask it for code.