Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
yaacov committed Jul 30, 2024
1 parent 4671e9c commit 8e2d6a8
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ podman run --rm --network host -it quay.io/rose/rose-game-engine:latest
podman run --rm --network host -it quay.io/rose/rose-game-web-ui:latest
```

### Running community contributed driver ( on http://127.0.0.1:8082 )

You can use community drivers to compare and evaluate your driver during the development process.

``` bash
podman run --rm --network host -it quay.io/yaacov/rose-go-driver:latest --port 8082
```

### Running your self driving module, requires a local `driver.py` file with your driving module. ( on http://127.0.0.1:8081 )

``` bash
Expand All @@ -82,3 +90,40 @@ podman run --rm --network host -it \
-e DRIVER=/driver/mydriver.py \
quay.io/rose/rose-game-ai-reference:latest
```

### Testing your driver

Send `car` and `track` information by uring `POST` request to your driver ( running on http://127.0.0.1:8081 ):

``` bash
curl -X POST -H "Content-Type: application/json" -d '{
"info": {
"car": {
"x": 3,
"y": 8
}
},
"track": [
["", "", "bike", "", "", ""],
["", "crack", "", "", "trash", ""],
["", "", "penguin", "", "", "water"],
["", "water", "", "trash", "", ""],
["barrier", "", "", "", "bike", ""],
["", "", "trash", "", "", ""],
["", "crack", "", "", "", "bike"],
["", "", "", "penguin", "water", ""],
["", "", "bike", "", "", ""]
]
}' http://localhost:8081/
```

The response in `JSON` format should include the car name and the recommended action:

``` json
{
"info": {
"name": "Go Cart",
"action": "pickup"
}
}
```

0 comments on commit 8e2d6a8

Please sign in to comment.