Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
wouterwln committed May 17, 2024
1 parent 60d8a43 commit 31f4fff
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
13 changes: 7 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ using Documenter
using RxEnvironments

makedocs(
sitename = "RxEnvironments.jl",
format = Documenter.HTML(),
modules = [RxEnvironments],
pages = [
sitename="RxEnvironments.jl",
format=Documenter.HTML(),
modules=[RxEnvironments],
pages=[
"Introduction" => "index.md",
"Getting Started" => "lib/getting_started.md",
"Example: Mountain Car" => "lib/example_mountaincar.md",
"Examples" => ["Mountain Car" => "lib/example_mountaincar.md",
"Windy Gridworld" => "lib/example_discrete_control_space_env.md"],
"Advanced Usage" => "lib/advanced_usage.md",
"Design Philosophy" => "lib/philosophy.md",
"API Reference" => "lib/api_reference.md",
Expand All @@ -19,5 +20,5 @@ makedocs(
# See "Hosting Documentation" and deploydocs() in the Documenter manual
# for more information.
deploydocs(
repo = "github.com/biaslab/RxEnvironments.jl.git"
repo="github.com/biaslab/RxEnvironments.jl.git"
)
Binary file added docs/src/img/animate_discrete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Pkg.add("RxEnvironments")
Pages = [
"lib/getting_started.md",
"lib/example_mountaincar.md",
"lib/example_discrete_control_space_env.md",
"lib/advanced_usage.md",
"lib/philosophy.md",
"lib/api_reference.md",
Expand Down
8 changes: 7 additions & 1 deletion docs/src/lib/example_discrete_control_space_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,16 @@ end

Now, we can create the environment and the agent and visualize the environment. We create a 10x10 grid with a goal at position (8, 5) and a crosswind that pushes the agent up by 1, and 2 around the goal. We place the agent at position (1, 1) and visualize the environment.

!!! note

It should be noted that, even though we have a discrete space environment with discrete timesteps, we don't use the `discrete=true` keyword argument in the `RxEnvironment` function. In this setting, because the environment only changes when an agent emits an action and has no time-dependent dynamics, the environment is effectively discrete and there is no difference. However, if we have multiple agents, the environment without the `discrete=true` keyword argument will update the state whenever any agent emits an action, whereas the environment with the `discrete=true` keyword argument will only update the state when all agents have emitted an action.


```@example DiscreteControlSpaceEnv
env = RxEnvironment(WindyGridWorld((0, 0, 0, 1, 1, 1, 2, 2, 1, 0), [], (8, 5)))
agent = add!(env, WindyGridWorldAgent((1, 1)))
```
```@julia
RxEnvironments.animate_state(env)
```
```
![](../img/animate_discrete.png)

0 comments on commit 31f4fff

Please sign in to comment.