Skip to content

Commit c4db4c2

Browse files
committed
Base content of RL course
0 parents  commit c4db4c2

File tree

5 files changed

+1500
-0
lines changed

5 files changed

+1500
-0
lines changed

.gitignore

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
# Windows
2+
Thumbs.db
3+
desktop.ini
4+
*.ppt
5+
*.pptx
6+
7+
# OS X
8+
.DS_Store
9+
.Spotlight-V100
10+
.Trashes
11+
._*
12+
13+
# Flug archives
14+
*.tar.zst
15+
*.json
16+
17+
# Byte-compiled / optimized / DLL files
18+
__pycache__/
19+
*.py[cod]
20+
*$py.class
21+
22+
# C extensions
23+
*.so
24+
25+
# Distribution / packaging
26+
.Python
27+
build/
28+
develop-eggs/
29+
dist/
30+
downloads/
31+
eggs/
32+
.eggs/
33+
lib/
34+
lib64/
35+
parts/
36+
sdist/
37+
var/
38+
wheels/
39+
pip-wheel-metadata/
40+
share/python-wheels/
41+
*.egg-info/
42+
.installed.cfg
43+
*.egg
44+
MANIFEST
45+
46+
# PyInstaller
47+
# Usually these files are written by a python script from a template
48+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
49+
*.manifest
50+
*.spec
51+
52+
# Installer logs
53+
pip-log.txt
54+
pip-delete-this-directory.txt
55+
56+
# Unit test / coverage reports
57+
htmlcov/
58+
.tox/
59+
.nox/
60+
.coverage
61+
.coverage.*
62+
.cache
63+
nosetests.xml
64+
coverage.xml
65+
*.cover
66+
*.py,cover
67+
.hypothesis/
68+
.pytest_cache/
69+
70+
# Translations
71+
*.mo
72+
*.pot
73+
74+
# Django stuff:
75+
*.log
76+
local_settings.py
77+
db.sqlite3
78+
db.sqlite3-journal
79+
80+
# Flask stuff:
81+
instance/
82+
.webassets-cache
83+
84+
# Scrapy stuff:
85+
.scrapy
86+
87+
# Sphinx documentation
88+
docs/_build/
89+
90+
# PyBuilder
91+
target/
92+
93+
# Jupyter Notebook
94+
.ipynb_checkpoints
95+
96+
# IPython
97+
profile_default/
98+
ipython_config.py
99+
100+
# pyenv
101+
.python-version
102+
103+
# pipenv
104+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
105+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
106+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
107+
# install all needed dependencies.
108+
#Pipfile.lock
109+
110+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
111+
__pypackages__/
112+
113+
# Celery stuff
114+
celerybeat-schedule
115+
celerybeat.pid
116+
117+
# SageMath parsed files
118+
*.sage.py
119+
120+
# Environments
121+
.env
122+
.venv
123+
env/
124+
venv/
125+
ENV/
126+
env.bak/
127+
venv.bak/
128+
129+
# Spyder project settings
130+
.spyderproject
131+
.spyproject
132+
133+
# Rope project settings
134+
.ropeproject
135+
136+
# mkdocs documentation
137+
/site
138+
139+
# mypy
140+
.mypy_cache/
141+
.dmypy.json
142+
dmypy.json
143+
144+
# Pyre type checker
145+
.pyre/
146+
147+
# virtual environment
148+
*_env/
149+
*-train-data/
150+
# model
151+
wandb/
152+
models/
153+
# data
154+
data/

README.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
# Tutorial on basic neural network concepts
2+
3+
<!-- [![DOI](https://zenodo.org/badge/759758400.svg)](https://zenodo.org/doi/10.5281/zenodo.10792272)
4+
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) -->
5+
6+
- [Download the repository](#download-the-repository)
7+
- [Getting started](#getting-started)
8+
- [Running the tutorial](#running-the-tutorial)
9+
10+
## Material for this tutorial
11+
12+
- The theoretical lecture can be found here:
13+
<!-- - [Part 1: Introduction to reinforcement learning](https://github.com/machine-learning-tutorial/neural-networks/blob/main/slides/nns-part1.pdf) -->
14+
15+
- The tutorial in slide form is here
16+
<!-- - [Part 1: simple gridworld (no ML libraries)](https://machine-learning-tutorial.github.io/neural-networks/1-neural-networks.html#/) -->
17+
18+
## Download the repository
19+
20+
### Get the repository with Git
21+
22+
You will need to have Git previously installed in your computer.
23+
To check if you have it installed, open your terminal and type:
24+
25+
``` bash
26+
git --version
27+
```
28+
29+
#### Git installation in MacOS
30+
31+
``` bash
32+
brew update
33+
brew install git
34+
```
35+
36+
#### Git installation in Linux
37+
38+
In Ubuntu/Debian
39+
40+
``` bash
41+
sudo apt install git
42+
```
43+
44+
In CentOS
45+
46+
``` bash
47+
sudo yum install git
48+
```
49+
50+
Once you have Git installed open your terminal, go to your desired directory, and type:
51+
52+
``` bash
53+
git clone https://github.com/machine-learning-tutorial/reinforcement-learning
54+
cd reinforcement-learning
55+
```
56+
57+
## Getting started
58+
59+
You need to install the dependencies before running the notebooks.
60+
61+
### Using conda
62+
63+
If you don't have conda installed already and want to use conda for environment management, you can install the miniconda as [described here](https://docs.conda.io/projects/miniconda/en/latest/miniconda-install.html).
64+
65+
- Create a conda env with `conda create -n rl-tutorial python=3.10`
66+
- Activate the environment with `conda activate rl-tutorial`
67+
- Install the required packages via `pip install -r requirements.txt`.
68+
- Run the following commands:
69+
70+
```bash
71+
python -m jupyter contrib nbextension install --user
72+
python -m jupyter nbextension enable varInspector/main
73+
```
74+
75+
- **After the tutorial** you can remove your environment with `conda remove -n nn-tutorial --all`
76+
77+
78+
## Running the tutorial
79+
80+
After installing the package
81+
82+
You can start the jupyter notebook in the terminal, and it will start a browser automatically
83+
84+
```bash
85+
python -m jupyter notebook
86+
```
87+
88+
Alternatively, you can use supported Editor to run the jupyter notebooks, e.g. with VS Code.
89+
90+
### Jupyter Notebooks
91+
92+
Use `cmd+Enter` to execute one cell block
93+
94+
### Part 1 Simple Gridworld (no ML libraries)
95+
96+
The first part of the tutorial is in `RL_simple_gridworld.ipynb`.
97+
98+
## Citing the tutorial
99+
100+
This tutorial is registered [Zenodo](https://zenodo.org/).
101+
Please use this DOI when citing this code:
102+
103+
<!-- ```bibtex
104+
@software{santamaria_garcia_2024_10792273,
105+
author = {Santamaria Garcia, Andrea and
106+
Xu, Chenran},
107+
title = {Tutorial on basic neural network concepts},
108+
month = 03,
109+
year = 2024,
110+
publisher = {Zenodo},
111+
version = {v1.0.1},
112+
doi = {10.5281/zenodo.10792273},
113+
url = {https://doi.org/10.5281/zenodo.10792273}
114+
}
115+
``` -->
116+
117+
## Disclaimer
118+
119+
The content of this repository was developed by the [AI4Accelerators team](https://www.ibpt.kit.edu/AI4Accelerators.php) at the [Institute of Beam Physics and Technology (IBPT)](https://www.ibpt.kit.edu/), [Karlsruhe Institute of Technology](https://www.kit.edu/english/).

0 commit comments

Comments
 (0)