This is a billiard environment, built with Unity.
The yellow ball is a agent.
This environment provides both visual observation and vector observation.
shape: (128, 64, 3)
[Y.x, Y.z, W.x, W.z, R1.x, R1.z, R2.x, R2.z]
(Y: yellow, W: white, R: red, x ∈ [-8.5, 8.5] , z ∈ [-18, 18])
There are 2 actions, theta(vectorAction[0]) and power(vectorAction[1]).
vectorActions are processed in the environment as follows.
theta = clip(vectorAction[0], 0, 1) * 2π
power = clip(vectorAction[1], 1e-4, 1) * 2000
(Note: If you put 0 in power, environment will ignore it.)
Case | Point | Terminal |
---|---|---|
Agent hit the white ball or nothing | -1 | True |
Agent hit the only one red ball | 0 | True |
Agent hit the only two red balls | 1 | False |
If episode ends, all ball positions are randomly changed.
- Windows10
- Python3
git clone https://github.com/hyunho1027/BillardRL
pip install -r requirements.txt
python main.py