Skip to content

Commit 5f8f5f6

Browse files
added some docs pages
1 parent 739f7f8 commit 5f8f5f6

File tree

11 files changed

+478
-0
lines changed

11 files changed

+478
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
13+
%SPHINXBUILD% >NUL 2>NUL
14+
if errorlevel 9009 (
15+
echo.
16+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17+
echo.installed, then set the SPHINXBUILD environment variable to point
18+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
19+
echo.may add the Sphinx directory to PATH.
20+
echo.
21+
echo.If you don't have Sphinx installed, grab it from
22+
echo.https://www.sphinx-doc.org/
23+
exit /b 1
24+
)
25+
26+
if "%1" == "" goto help
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

resources/ariel_header.drawio

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<mxfile host="Electron" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/28.0.6 Chrome/138.0.7204.100 Electron/37.2.3 Safari/537.36" version="28.0.6">
2+
<diagram name="Page-1" id="QVoZ1cRGxMKyArq30myL">
3+
<mxGraphModel dx="1234" dy="883" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="_mfbnebWsyxYkhm_JBG--8" value="" style="rounded=1;whiteSpace=wrap;html=1;strokeColor=light-dark(#425765, #ededed);fillColor=light-dark(#425765, #ededed);arcSize=4;" vertex="1" parent="1">
8+
<mxGeometry x="110" y="292.5" width="647.5" height="220" as="geometry" />
9+
</mxCell>
10+
<mxCell id="_mfbnebWsyxYkhm_JBG--10" value="" style="group" vertex="1" connectable="0" parent="1">
11+
<mxGeometry x="140" y="320" width="620" height="165" as="geometry" />
12+
</mxCell>
13+
<mxCell id="_mfbnebWsyxYkhm_JBG--12" value="" style="group" vertex="1" connectable="0" parent="_mfbnebWsyxYkhm_JBG--10">
14+
<mxGeometry width="595" height="165" as="geometry" />
15+
</mxCell>
16+
<mxCell id="_mfbnebWsyxYkhm_JBG--1" value="" style="triangle;whiteSpace=wrap;html=1;direction=north;strokeWidth=15;strokeColor=light-dark(#bdd192, #ededed);fillColor=none;" vertex="1" parent="_mfbnebWsyxYkhm_JBG--12">
17+
<mxGeometry width="190" height="165" as="geometry" />
18+
</mxCell>
19+
<mxCell id="_mfbnebWsyxYkhm_JBG--11" value="" style="group" vertex="1" connectable="0" parent="_mfbnebWsyxYkhm_JBG--12">
20+
<mxGeometry x="215" width="380" height="165" as="geometry" />
21+
</mxCell>
22+
<mxCell id="_mfbnebWsyxYkhm_JBG--3" value="&lt;font&gt;ARIEL&lt;/font&gt;" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontColor=light-dark(#94e4ff, #ededed);fontFamily=Tahoma;fontSize=101;" vertex="1" parent="_mfbnebWsyxYkhm_JBG--11">
23+
<mxGeometry x="42.5" width="295" height="60" as="geometry" />
24+
</mxCell>
25+
<mxCell id="_mfbnebWsyxYkhm_JBG--5" value="Autonomous&amp;nbsp; Robots through Integrated Evolution and Learning" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=25;fontColor=light-dark(#bdd192, #ededed);" vertex="1" parent="_mfbnebWsyxYkhm_JBG--11">
26+
<mxGeometry y="95" width="380" height="70" as="geometry" />
27+
</mxCell>
28+
</root>
29+
</mxGraphModel>
30+
</diagram>
31+
</mxfile>

resources/ariel_header.svg

Lines changed: 4 additions & 0 deletions
Loading

source/GUI.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!-- TODO:
2+
- check if subtree crossover is in ARIEL
3+
- add image of GUI for example. -->
4+
# GUI
5+
6+
## What you can the GUI do?
7+
This graphical user interface (GUI) provides an interactive, node-based workspace where users can visually create, connect, and manage the evolutionary operators in the experiments.
8+
9+
Instead of relying solely on text or code, the node editor allows tasks to be represented as nodes. The window typically consists of a canvas for arranging nodes, connectors for defining relationships, and panels for adjusting properties.
10+
11+
This can be seen on the example below, where we have selected tournament selection with a tournament size of 5 for parent selection and subtree crossover for the crossover operator
12+
13+
### ADD IMAGE OF GUI DOING WHAT THE LAST PARAGRAPH SAYS
14+
15+

source/conf.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# For the full list of built-in configuration values, see the documentation:
4+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
5+
6+
# -- Project information -----------------------------------------------------
7+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8+
9+
project = 'Ariel'
10+
copyright = '2025, CI Group'
11+
author = 'CI Group'
12+
release = '0.1.0'
13+
14+
# -- General configuration ---------------------------------------------------
15+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
16+
17+
extensions = ["sphinx.ext.autodoc",
18+
"sphinx.ext.apidoc",
19+
"sphinx.ext.napoleon",
20+
"sphinx.ext.viewcode",
21+
"sphinx.ext.doctest",
22+
"sphinx.ext.duration",
23+
"sphinx.ext.autosectionlabel",
24+
"myst_parser",]
25+
26+
27+
templates_path = ['_templates']
28+
exclude_patterns = []
29+
30+
31+
32+
# -- Options for HTML output -------------------------------------------------
33+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
34+
35+
html_theme = 'furo'
36+
html_logo = "../resources/ariel_logo.png"
37+
html_favicon = "../resources/ariel_logo.png"
38+
html_static_path = ['_static']
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Contributing guide
2+
==================
3+
If you intend to contribute you may find this guide helpful. Contributions are highly appreciated.
4+
5+
----------------------------
6+
Publishing your contribution
7+
----------------------------
8+
If you added something to Ariel that you would like to share with other people, you can do so by creating a `pull request <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests>`_ (PR) on `GitHub <https://github.com/ci-group/Ariel/pulls>`_.
9+
The first time you make a contribution to a Ariel package your PR should add your name to the ``authors`` list in that package's ``pyproject.toml``.
10+
**Only open PRs on the** ``development`` **-branch!** And make sure that only your commits are present, otherwise do a rebase.
11+
12+
Note that a general heuristic is, if your addition adds a dependency of another revolve package to the existing dependencies, you might not want to structure it that way.
13+
For a guideline what can depend on what, look at the package diagram on the main page.
14+
15+
**Important Information before merging your PRs:**
16+
17+
- For merging into the ``development``-branch: Always use `Squash and Merge`.
18+
- For merging into the ``master``-branch: Always use `Rebase and Merge`.
19+
20+
----------------------
21+
Developer installation
22+
----------------------
23+
The normal installation guide applies. You should definitely use :ref:`editable mode<installation/index:Editable Mode>`.
24+
Using the ``requirements_dev.txt`` allows you to quickly install all packages in editable mode, by executing: ``pip install -r requirements_dev.txt``.
25+
If you want to uninstall all Ariel packages, you can use ``./uninstall.sh``, which uninstall all packages like ``Ariel*``.
26+
27+
----------------------
28+
Continuous integration
29+
----------------------
30+
Github Actions is used for continuous integration(CI). You can find plenty of resources about the CI online. It is located in the Ariel directory at ``.github/workflows``.
31+
You cannot directly run the CI configuration locally, but scripts are available to run the tools.
32+
33+
----------
34+
Code tools
35+
----------
36+
Ariel code quality is checked by a variety of tools. See the ``codetools`` directory.
37+
The CI runs these tools automatically.
38+
A shorthand for running the tools and applying as many automatic fixes as possible is ``./codetools/fix_all.sh``.
39+
Not all problems can be fixed automatically, but the errors should be self explanatory.
40+
Make sure to regularly run the tools during development (at least mypy), as they can help you detect many mistakes early.
41+
42+
.. list-table:: Ariel code tools
43+
:widths: 1 4
44+
:header-rows: 1
45+
46+
* - Tool
47+
- Description
48+
* - Black
49+
- Python code formatting.
50+
* - Darglint
51+
- Check if python docstrings match what they are documenting.
52+
* - Isort
53+
- Sorts python imports.
54+
* - Mypy
55+
- Static type checker for Python.
56+
* - Pydocstyle
57+
- Makes docstrings conform to a single style. Mostly used to check for missing docstrings.
58+
* - Pyflakes
59+
- Finds simple errors in Python code. Mostly used to check for unused imports.
60+
* - Sort-all
61+
- Sorts the ``__all__`` in ``__init__.py`` files.
62+
63+
-------------
64+
Documentation
65+
-------------
66+
This documentation is automatically built by the CI and uploaded to github pages.
67+
Code is analyzed and an API reference is generated programmatically.
68+
You can compile the documentation using the Makefile available at ``./docs`` using ``make -C docs html``.
69+
70+
---------------
71+
Version control
72+
---------------
73+
The codebase is managed through Git. We strictly enforce a `linear history <https://www.bitsnbites.eu/a-tidy-linear-git-history/>`_.
74+
Releases are according to `Semantic Versioning <https://semver.org/>`_.

source/extra_info.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<!-- TODO:
2+
Complete EC module section
3+
Fix image not working
4+
Hyperlink to gui in starting guide
5+
Running experiments with GUI
6+
-->
7+
# Evolutionary Computing Course Documentation
8+
9+
This section contains information more directed torwards the use of ARIEL for the Evolutionary Computing course. Here you can find installation information, basic functions needed for the assignments, and tips on how some things are done using ARIEL.
10+
11+
## Run the example files
12+
After following the normal ARIEL installation guide you can come here for the following steps. We highly recommend you use a virtual environment alongside uv, this will help significantly with requirement conflicts.
13+
14+
### uv version
15+
Things are a bit simpler if you are using uv. In your terminal simply run the following commands one by one:
16+
```bash
17+
uv venv
18+
uv sync
19+
uv run examples/0_render_single_frame.py
20+
```
21+
22+
These commands will automatically create the virtual environment, activate it, install all the requirements with their respecitve versions to avoid any conflicts and then run the example file. After you create the venv you can activate it again like you would with a normal one using:
23+
```bash
24+
Activate venv:
25+
./.venv/Scripts/activate
26+
27+
Deactivate venv:
28+
./.venv/Scripts/deactivate
29+
```
30+
31+
### Pip version
32+
If you are using pip then you can create a normal virtual environment with:
33+
```bash
34+
python -m venv C:/path/to/new/virtual/environment
35+
```
36+
or create it with the IDE you are using. For example, in VS Code just press `ctrl+shift+p` and select `Python: Create Environment`. Then run one of the example files in the examples module. For example `python examples/0_render_single_frame.py`, this file starts a simulation and takes a screenshot of a single frame of a red cube.
37+
38+
It should look something like this:
39+
40+
![image](../resources/example_image.png)
41+
<!-- <p align="center">
42+
<img src="../resources/example_image.png" width="1000">
43+
</p> -->
44+
45+
46+
## Basic ARIEL Functions
47+
In this section we will present some of the basic functionalities of ARIEL.
48+
49+
### EC Module
50+
To make implementation easier, ARIEL has many built in evolutionary operators (much like [DEAP](https://deap.readthedocs.io/en/master/)) for you to use in your work. This happens via the EC module.
51+
52+
The functions of this module can be found under:
53+
```python
54+
import ariel.ec as ec
55+
```
56+
57+
## Starting Guide
58+
The starting guide intends to help you start your first ARIEL experiment. This can be done in two ways. By running the experiments manually from a python file or using the GUI [`HYPERLINK TO GUI PAGE ON THE DOCS`].
59+
60+
### Run Experiments Manually
61+
To run an experiment manually you just need to define all the necessary parameters and run the file. Here is an example:
62+
63+
```python
64+
# Third-party libraries
65+
import mujoco
66+
67+
# Local libraries
68+
from ariel.environments.simple_flat_world import SimpleFlatWorld
69+
from ariel.utils.renderers import single_frame_renderer
70+
71+
72+
def main() -> None:
73+
"""Entry point."""
74+
# World
75+
world = SimpleFlatWorld()
76+
77+
# Object
78+
body = mujoco.MjSpec()
79+
cube = body.worldbody.add_body(name="cube")
80+
cube.add_geom(
81+
type=mujoco.mjtGeom.mjGEOM_BOX,
82+
size=(0.1, 0.1, 0.1),
83+
rgba=(0.8, 0.2, 0.2, 1.0),
84+
)
85+
86+
# Add object to world
87+
world.spawn(body)
88+
89+
# Generate the model and data
90+
model: mujoco.MjModel = world.spec.compile()
91+
data = mujoco.MjData(model)
92+
93+
# Render a single frame
94+
single_frame_renderer(model, data, steps=10_000)
95+
```
96+
97+
### Run Experiments Using the GUI
98+
For a more detailed explanation on how the GUI works and how to use it check out the {doc}`GUI`
99+
100+
INSERT SCREENSHOT OF GUI
101+
102+
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA WHAT IS A GUI!!!!!

source/index.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.. Ariel documentation master file, created by
2+
sphinx-quickstart on Tue Aug 12 20:58:26 2025.
3+
You can adapt this file completely to your liking, but it should at least
4+
contain the root `toctree` directive.
5+
6+
TODO:
7+
- Add sections on robots, evolution and robot evolution
8+
9+
Ariel documentation
10+
===================
11+
.. figure:: ../resources/ariel_header.svg
12+
:alt: Ariel Logo
13+
:align: center
14+
15+
Ariel is a Python package, similar to Revolve, that provides efficient and easy-to-use tools for many aspects of evolutionary computing and evolutionary robotics.
16+
It is designed with a clear API, sensible defaults, and support for both beginners and advanced users.
17+
18+
Features
19+
--------
20+
21+
.. list-table::
22+
:widths: 20 80
23+
:header-rows: 0
24+
25+
* - **Easy to use GUI**
26+
- Every aspect of the package from EC to ER can be configured and run through a user-friendly graphical interface.
27+
* - **Evolutionary Algorithms**
28+
- Already implemented evolutionary operators.
29+
* - **Evolutionary Robotics**
30+
- Tools for simulating and evolving robots in various environments.
31+
32+
Get started below, or explore the full documentation for more details.
33+
34+
Installation
35+
------------
36+
See the :ref:`installation` guide for details.
37+
38+
39+
License
40+
-------
41+
Copyright (c) 2025, Ariel. All rights reserved.
42+
43+
.. toctree::
44+
:maxdepth: 3
45+
:caption: Contents:
46+
47+
Introduction to modular robots <introduction_to_modular_robots/index>
48+
Contributing guide <contributing_guide/index>
49+
installation_guide.md
50+
extra_info.md
51+
GUI.md
52+

0 commit comments

Comments
 (0)