Skip to content

Commit

Permalink
Lunar Lander Example (#70)
Browse files Browse the repository at this point in the history
* Convert lunar lander example to CMA-ME

* Add lunar lander to examples list

* Add lunar lander to examples tests

* Mention example in lunar lander tutorial

* Add some notes to sphere example

* Watch examples when building docs

* Bump fire version in setup.py
  • Loading branch information
btjanaka committed Feb 2, 2021
1 parent dc02349 commit e772d30
Show file tree
Hide file tree
Showing 8 changed files with 431 additions and 17 deletions.
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ servedocs: ## compile the docs watching for changes
DOCS_MODE=dev sphinx-autobuild \
--open-browser \
--watch ribs/ \
docs/ \
docs/_build/html

servedocs-ignore-vim: ## compile the docs watching for changes, ignore vim .swp files
DOCS_MODE=dev sphinx-autobuild \
--open-browser \
--watch ribs/ \
--ignore *.swp \
--watch examples/ \
docs/ \
docs/_build/html

Expand Down
8 changes: 5 additions & 3 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
:hidden:
examples/sphere
examples/lunar_lander
```

Examples assume some experience with pyribs and provide commented source code
Expand All @@ -14,6 +15,7 @@ with:
pip install ribs[examples]
```

| Name | Archive | Emitter | Optimizer |
| ---------------------- | --------- | --------- | ----------------------------------- |
| {doc}`examples/sphere` | (several) | (several) | {class}`~ribs.optimizers.Optimizer` |
| Name | Archive | Emitter | Optimizer |
| ---------------------------- | ----------------------------------- | ------------------------------------------ | ----------------------------------- |
| {doc}`examples/sphere` | (several) | (several) | {class}`~ribs.optimizers.Optimizer` |
| {doc}`examples/lunar_lander` | {class}`~ribs.archives.GridArchive` | {class}`~ribs.emitters.ImprovementEmitter` | {class}`~ribs.optimizers.Optimizer` |
11 changes: 11 additions & 0 deletions docs/examples/lunar_lander.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Lunar Lander Relanded: Using Dask to Distribute Evaluations

This example extends the [Lunar Lander tutorial](../tutorials/lunar_lander) by
using [Dask](https://dask.org) to distribute evaluations and thus speed things
up. It also adds in more logging capabilities and a CLI.

```{eval-rst}
.. literalinclude:: ../../examples/lunar_lander.py
:language: python
:linenos:
```

0 comments on commit e772d30

Please sign in to comment.