control systems with MUD points
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
mm cdee785166 add notebook, support interactive output to enable visualizing results (#1) 3 years ago
.gitignore Initial commit 3 years ago
DemoGym.ipynb add notebook, support interactive output to enable visualizing results (#1) 3 years ago
DemoMUD.ipynb add notebook, support interactive output to enable visualizing results (#1) 3 years ago
README.md add notebook, support interactive output to enable visualizing results (#1) 3 years ago
data.pkl data file 3 years ago
headless.sh add notebook, support interactive output to enable visualizing results (#1) 3 years ago
main.py add notebook, support interactive output to enable visualizing results (#1) 3 years ago
requirements.txt requirements 3 years ago
sample.py cleanup 3 years ago

README.md

mud-games

control systems with MUD points

installation

pip install -r requirements.txt

usage

A data.pkl file is provided for your convenience with input / output samples.

python main.py

info

The inputs are the parameters to a 1x4 matrix which is multiplied against the observations of the state in order to make a decision for the next action (push left or right). The output of the vector inner-product is binarized by comparing it to zero as a threshold value.

The parameter space is standard normal. There is no assumed error in observations; the "data variance" is designed to reflect the acceptable ranges for the observations:

  • The cart x-position (index 0) can be take values between (-4.8, 4.8), but the episode terminates if the cart leaves the (-2.4, 2.4) range.
  • The pole angle can be observed between (-.418, .418) radians (or ±24°), but the episode terminates if the pole angle is not in the range (-.2095, .2095) (or ±12°)

Therefore, since our objective is to stabilize the cart, the target "time series signal" is zero for all four dimensions of the observation space. The presumed "data variance" should actually correspond to the acceptable bands of signal (WIP).

generate data

You can generate your own data with:

python sample.py

Note: if you change the presumed sample space in data.py, you should make the corresponding changes to the initial distribution in main.py.

improvements

Using the following presumptions, we can establish better values for the "data variance":

The angular momentum of the pole is the most important thing to stabilize.

headless mode

Run ./headless.sh (requires sudo) to install virtual displays so you can view results in a Jupyter notebook.