├── __init__.py
├── FCPKeepAway
└── __init__.py
├── FCPPassing
└── __init__.py
├── GeoFriends2
└── __init__.py
├── KiloBots
└── __init__.py
├── Navigation
└── __init__.py
├── Pursuit
└── __init__.py
├── SimpleAdv
└── __init__.py
├── SimpleSL
└── __init__.py
├── SimpleTag
└── __init__.py
├── Traffic
└── __init__.py
├── simulator
└── __init__.py
├── BlindGroupUp
└── __init__.py
├── KiloBotsJoin
└── __init__.py
├── KiloBotsSplit
└── __init__.py
├── KiloBotsSwarm
└── __init__.py
├── SimpleReference
└── __init__.py
├── SimpleSpread
└── __init__.py
├── SimpleSpread6
└── __init__.py
├── KiloBotsJoinSwarm
└── __init__.py
├── KiloBotsSplitSwarm
└── __init__.py
├── simulator_fcp
├── __init__.py
└── fcp
│ ├── movs
│ ├── SideLeftGoalieSlow.xml
│ ├── getup
│ │ ├── GetupZeroWalk.xml
│ │ ├── GetupBack_100414.xml
│ │ ├── GetUpSideLeftNewModel.xml
│ │ ├── GetUpSideRightNewModel.xml
│ │ ├── ContFallBack.xml
│ │ ├── ContFallFront.xml
│ │ ├── FallFront.xml
│ │ └── FallBack.xml
│ ├── goalie
│ │ ├── GoalieHockeyRight.xml
│ │ ├── CatchLeft.xml
│ │ ├── CatchRight.xml
│ │ ├── GoalieHockeyGround.xml
│ │ ├── GoalieHockeyStepRight.xml
│ │ ├── GoalieHockeyStepLeft.xml
│ │ ├── GoalieHockeyRotateLeft.xml
│ │ ├── GoalieHockeyRotateRight.xml
│ │ ├── FallToSide.xml
│ │ ├── FallBack.xml
│ │ └── FallFront.xml
│ ├── type4
│ │ └── kick
│ │ │ └── oKick20RightRPF8Ver2_bias.txt
│ ├── curParams.txt
│ ├── others
│ │ └── zerp
│ ├── matrices.txt
│ ├── kick
│ │ ├── KickLeft2.xml
│ │ ├── KickSideRightKungFu.xml
│ │ └── ImprovedSlotBehaviorExample.xml
│ ├── test
│ │ ├── RotateAroundRight.xml.bak
│ │ ├── MiniWalk.xml
│ │ ├── FootUp.xml
│ │ ├── TurnLeft.xml
│ │ ├── TurnRight.xml
│ │ ├── RotatePrepare.xml
│ │ ├── RotateLeftGoalieFastLRei.xml
│ │ ├── RotateRightGoalie.xml
│ │ └── RotateLeftGoalie.xml
│ ├── zero
│ │ ├── ZeroWalkForKick.xml
│ │ ├── ZeroJoints.xml
│ │ ├── ZeroKick.xml
│ │ ├── ZeroTest.xml
│ │ ├── ZeroOptPosition.xml
│ │ ├── ZeroPosition.xml
│ │ ├── ZeroReflectTC17.xml
│ │ ├── ZeroKick2.xml
│ │ ├── ZeroZMPWalk.xml
│ │ ├── ZeroWalkSide.xml
│ │ ├── ZeroZMPWalkFast.xml
│ │ ├── ZeroTurnPosition.xml
│ │ ├── ZeroWalkPosition.xml
│ │ └── ZeroWalkFastPosition.xml
│ └── prepkick
│ │ ├── RotateRightF.xml
│ │ ├── RotAroundRight.xml
│ │ ├── RotAroundRightF.xml
│ │ ├── RotAroundRightS.xml
│ │ ├── RotAroundLeft.xml
│ │ ├── RotAroundLeftF.xml
│ │ ├── RotAroundLeftS.xml
│ │ ├── RotateLeft.xml
│ │ ├── RotateLeftS.xml
│ │ ├── SideRightS.xml
│ │ ├── SideRight.xml
│ │ ├── oldSideLeft.xml
│ │ ├── BackWalk.xml
│ │ ├── BackWalkS.xml
│ │ ├── BackWalkF.xml
│ │ ├── BackWalkVF.xml
│ │ ├── FrontWalkF.xml
│ │ ├── SideLeftF.xml
│ │ ├── SideLeftS.xml
│ │ ├── SideRightF.xml
│ │ ├── FrontWalkVF.xml
│ │ ├── oldSideRight.xml
│ │ ├── SideLeft.xml
│ │ ├── RotateLeftF.xml
│ │ ├── FrontWalk.xml
│ │ ├── FrontWalkS.xml
│ │ ├── RotateRight.xml
│ │ └── RotateRightS.xml
│ ├── deepAgent
│ ├── kill.sh
│ ├── formations
│ ├── flux9players1.conf
│ ├── Flux1_3D11.conf
│ ├── KeepAway.conf
│ └── normal_formation_3D_9Players.conf
│ ├── skills
│ ├── OmniWalk
│ │ └── matrices.txt
│ └── WalkEngine
│ │ └── config
│ │ ├── matrices.txt
│ │ ├── matrices19.txt
│ │ ├── matrices21.txt
│ │ ├── matrices23.txt
│ │ ├── matrices20.txt
│ │ ├── matrices22.txt
│ │ └── matrices24.txt
│ └── start.sh
├── simulator_geof2
├── Players
│ ├── __init__.py
│ └── Agent.py
├── Simulator
│ ├── __init__.py
│ └── Utils.py
└── MapGenerators
│ ├── __init__.py
│ ├── Dome.png
│ ├── Basic.png
│ ├── Corners.png
│ ├── Floors.png
│ ├── Pyramid.png
│ ├── Split.png
│ ├── TwoFloors.png
│ ├── TwoTowers.png
│ ├── HighPlatform.png
│ ├── TwoHighTowers.png
│ ├── MapGenerator.py
│ ├── Pyramid.py
│ ├── Dome.py
│ ├── Basic.py
│ ├── HighPlatform.py
│ ├── Map.py
│ ├── Split.py
│ ├── TwoHighTowers.py
│ ├── Corners.py
│ ├── Obstacle.py
│ ├── TwoFloors.py
│ ├── TwoTowers.py
│ └── Floors.py
├── simulator_kilobots
├── __init__.py
├── envs
│ └── __init__.py
└── kb_lib
│ ├── tools.py
│ └── __init__.py
├── simulator_openai
├── scenarios
│ ├── __init__.py
│ └── simple.py
├── scenario.py
├── __init__.py
├── make_env.py
└── policy.py
├── TrafficBatch.sh
├── NavBatch.sh
├── BlindGroupUpBatch.sh
├── FCPPass.sh
├── FCPKeepAway.sh
├── KBBatchDist.sh
├── PursuitBatchDist.sh
├── KBJBatchDist.sh
├── KBSBatchDist.sh
├── requirements.txt
├── SwarmKBSBatchDist.sh
├── BlindGroupUpACBatch.sh
├── NavACBatch.sh
├── NavParamBatch.sh
├── PursuitACBatchDist.sh
├── README.md
├── .gitignore
├── NavCommsBatch.sh
├── TrafficCommsBatch.sh
└── BlindGroupUpCommsBatch.sh
/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/FCPKeepAway/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/FCPPassing/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/GeoFriends2/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/KiloBots/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Navigation/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Pursuit/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/SimpleAdv/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/SimpleSL/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/SimpleTag/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Traffic/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/simulator/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/BlindGroupUp/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/KiloBotsJoin/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/KiloBotsSplit/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/KiloBotsSwarm/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/SimpleReference/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/SimpleSpread/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/SimpleSpread6/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/KiloBotsJoinSwarm/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/KiloBotsSplitSwarm/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/simulator_fcp/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulator_geof2/Players/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/simulator_geof2/Simulator/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/simulator_kilobots/__init__.py:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/__init__.py:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/SideLeftGoalieSlow.xml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/deepAgent:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_fcp/fcp/deepAgent
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Dome.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/Dome.png
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Basic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/Basic.png
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Corners.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/Corners.png
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Floors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/Floors.png
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Pyramid.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/Pyramid.png
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Split.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/Split.png
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/TwoFloors.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/TwoFloors.png
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/TwoTowers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/TwoTowers.png
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/getup/GetupZeroWalk.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_fcp/fcp/movs/getup/GetupZeroWalk.xml
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/HighPlatform.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/HighPlatform.png
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/TwoHighTowers.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_geof2/MapGenerators/TwoHighTowers.png
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/getup/GetupBack_100414.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_fcp/fcp/movs/getup/GetupBack_100414.xml
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/GoalieHockeyRight.xml:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/david-simoes-93/A3C3/HEAD/simulator_fcp/fcp/movs/goalie/GoalieHockeyRight.xml
--------------------------------------------------------------------------------
/simulator_kilobots/envs/__init__.py:
--------------------------------------------------------------------------------
1 | from .kilobots_env import KilobotsEnv
2 | from .yaml_kilobots_env import YamlKilobotsEnv
3 | from .direct_control_kilobots_env import DirectControlKilobotsEnv
--------------------------------------------------------------------------------
/simulator_openai/scenarios/__init__.py:
--------------------------------------------------------------------------------
1 | import imp
2 | import os.path as osp
3 |
4 |
5 | def load(name):
6 | pathname = osp.join(osp.dirname(__file__), name)
7 | return imp.load_source('', pathname)
8 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/kill.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | killall -9 fcpagent
3 | killall -9 optAgent
4 | killall -9 preCondLearn
5 | killall -9 behaviorTest
6 | #killall -9 simspark
7 | #killall -9 rcssserver3d
8 | #killall -9 rcssmonitor3d
9 | #killall -9 roboviz
10 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/MapGenerator.py:
--------------------------------------------------------------------------------
1 | from abc import ABC, abstractmethod
2 |
3 | from simulator_geof2.MapGenerators import Map
4 |
5 |
6 | # Map gen class
7 | class MapGenerator(ABC):
8 |
9 | # Returns a Map object
10 | @abstractmethod
11 | def generate(self):
12 | return Map()
13 |
--------------------------------------------------------------------------------
/simulator_kilobots/kb_lib/tools.py:
--------------------------------------------------------------------------------
1 | import pandas as pd
2 |
3 |
4 |
5 | def get_dataframe_from_state(state):
6 | num_kilobots = state['kilobots'].shape[0]
7 | num_objects = state['objects'].shape[0]
8 |
9 | kilobot_index, objects_index, light_index = get_multiindices(num_kilobots, num_objects)
10 |
11 | pass
--------------------------------------------------------------------------------
/TrafficBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | for trial in 0
4 | do
5 | for comm in 0
6 | do
7 | python3 Traffic/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm"
8 | sleep 5
9 | mkdir Traffic-"$comm"Comm-Trial"$trial"
10 | mv *.log model train_* Traffic-"$comm"Comm-Trial"$trial"/
11 | done
12 | done
13 |
--------------------------------------------------------------------------------
/simulator_kilobots/kb_lib/__init__.py:
--------------------------------------------------------------------------------
1 | from .kilobot import Kilobot, PhototaxisKilobot, SimplePhototaxisKilobot, SimpleVelocityControlKilobot,\
2 | SimpleAccelerationControlKilobot
3 | from .body import Body, Quad, CornerQuad, Triangle, Circle, CForm, TForm, LForm
4 | from .light import CircularGradientLight, GradientLight, CompositeLight
5 |
--------------------------------------------------------------------------------
/NavBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | for trial in 0
4 | do
5 | for comm in 0 1 5 10 20
6 | do
7 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm"
8 | sleep 5
9 | mkdir Navigation-"$comm"Comm-Trial"$trial"
10 | mv model train_* Navigation-"$comm"Comm-Trial"$trial"/
11 | done
12 | done
13 |
--------------------------------------------------------------------------------
/BlindGroupUpBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | for trial in 0
4 | do
5 | for comm in 10 20
6 | do
7 | python3 BlindGroupUp/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm"
8 | sleep 5
9 | mkdir BlindGroupUp-"$comm"Comm-Trial"$trial"
10 | mv model train_* BlindGroupUp-"$comm"Comm-Trial"$trial"/
11 | done
12 | done
13 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/type4/kick/oKick20RightRPF8Ver2_bias.txt:
--------------------------------------------------------------------------------
1 | 0.092624751 -3.451527128 -9.901392117 -42.00453295 -145.6415772 -42.70243455 7.195034561 -53.53611857 -10.50586828 7.154486577 5.651235552 0.9674692795 13.04791372 -31.81284421 5.144989278 89.50243314 3.319103522 29.83223427 5.114189503 0.6487625878 1.235395113 -26.84471082 -50.5845458 -41.61533517 16.07928564
2 |
--------------------------------------------------------------------------------
/simulator_openai/scenario.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 |
3 | # defines scenario upon which the world is built
4 | class BaseScenario(object):
5 | # create elements of the world
6 | def make_world(self):
7 | raise NotImplementedError()
8 | # create initial conditions of the world
9 | def reset_world(self, world):
10 | raise NotImplementedError()
11 |
--------------------------------------------------------------------------------
/FCPPass.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | thread_number=6
4 | count=`expr $thread_number - 1`
5 |
6 | for trial in 0
7 | do
8 | for i in `seq 0 $count`
9 | do
10 | python3 FCPPassing/MA3C-Distributed.py --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" & #>a3c3log"$i" 2>&1 &
11 | echo python3 A3C/A3C-Distributed.py --task_max="$thread_number" --task_index="$i"
12 | sleep 5
13 | done
14 | wait
15 | sleep 5
16 | mkdir FCPPassing-Trial"$trial"
17 | mv dist_model train_* FCPPassing-Trial"$trial"/
18 | done
19 |
--------------------------------------------------------------------------------
/FCPKeepAway.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | thread_number=6
4 | count=`expr $thread_number - 1`
5 |
6 | for trial in 0
7 | do
8 | for i in `seq 0 $count`
9 | do
10 | python3 FCPKeepAway/MA3C-Distributed.py --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" & #>a3c3log"$i" 2>&1 &
11 | echo python3 A3C/A3C-Distributed.py --task_max="$thread_number" --task_index="$i"
12 | sleep 5
13 | done
14 | wait
15 | sleep 5
16 | mkdir FCPKeepAway-Trial"$trial"
17 | mv dist_model train_* FCPKeepAway-Trial"$trial"/
18 | done
19 |
--------------------------------------------------------------------------------
/simulator_openai/__init__.py:
--------------------------------------------------------------------------------
1 | from gym.envs.registration import register
2 |
3 | # Multiagent envs
4 | # ----------------------------------------
5 |
6 | register(
7 | id='MultiagentSimple-v0',
8 | entry_point='multiagent.envs:SimpleEnv',
9 | # FIXME(cathywu) currently has to be exactly max_path_length parameters in
10 | # rllab run script
11 | max_episode_steps=100,
12 | )
13 |
14 | register(
15 | id='MultiagentSimpleSpeakerListener-v0',
16 | entry_point='multiagent.envs:SimpleSpeakerListenerEnv',
17 | max_episode_steps=100,
18 | )
19 |
--------------------------------------------------------------------------------
/KBBatchDist.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | thread_number=12
4 | count=`expr $thread_number - 1`
5 |
6 | for trial in 0
7 | do
8 | for comm in 5
9 | do
10 | for i in `seq 0 $count`
11 | do
12 | python3 KiloBots/MA3C-Distributed.py --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
13 | echo python3 KiloBots/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
14 | sleep 5
15 | done
16 | wait
17 | sleep 5
18 | mkdir KiloBots-"$comm"Comm-Trial"$trial"
19 | mv dist_model train_* KiloBots-"$comm"Comm-Trial"$trial"/
20 | done
21 | done
22 |
--------------------------------------------------------------------------------
/PursuitBatchDist.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | thread_number=12
4 | count=`expr $thread_number - 1`
5 |
6 | for trial in 0 1 2
7 | do
8 | for comm in 0 1 5 10 20
9 | do
10 | for i in `seq 0 $count`
11 | do
12 | python3 Pursuit/A3C-Distributed.py --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
13 | echo python3 A3C/A3C-Distributed.py --task_max="$thread_number" --task_index="$i"
14 | sleep 5
15 | done
16 | wait
17 | sleep 5
18 | mkdir Pursuit-"$comm"Comm-Trial"$trial"
19 | mv dist_model train_* Pursuit-"$comm"Comm-Trial"$trial"/
20 | done
21 | done
22 |
--------------------------------------------------------------------------------
/KBJBatchDist.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | thread_number=12
4 | count=`expr $thread_number - 1`
5 |
6 | for trial in 0
7 | do
8 | for comm in 5
9 | do
10 | for i in `seq 0 $count`
11 | do
12 | python3 KiloBotsJoin/MA3C-Distributed.py --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
13 | echo python3 KiloBotsJoin/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
14 | sleep 5
15 | done
16 | wait
17 | sleep 5
18 | mkdir KiloBotsJoin-"$comm"Comm-Trial"$trial"
19 | mv dist_model train_* KiloBotsJoin-"$comm"Comm-Trial"$trial"/
20 | done
21 | done
22 |
--------------------------------------------------------------------------------
/KBSBatchDist.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | thread_number=12
4 | count=`expr $thread_number - 1`
5 |
6 | for trial in 0
7 | do
8 | for comm in 5
9 | do
10 | for i in `seq 0 $count`
11 | do
12 | python3 KiloBotsSplit/MA3C-Distributed.py --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
13 | echo python3 KiloBotsSplit/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
14 | sleep 5
15 | done
16 | wait
17 | sleep 5
18 | mkdir KiloBotsSplit-"$comm"Comm-Trial"$trial"
19 | mv dist_model train_* KiloBotsSplit-"$comm"Comm-Trial"$trial"/
20 | done
21 | done
22 |
--------------------------------------------------------------------------------
/requirements.txt:
--------------------------------------------------------------------------------
1 | absl-py==0.6.1
2 | astor==0.7.1
3 | box2d-py==2.3.8
4 | certifi==2018.11.29
5 | chardet==3.0.4
6 | cycler==0.10.0
7 | future==0.17.1
8 | gast==0.2.1.post0
9 | grpcio==1.17.1
10 | gym==0.10.9
11 | idna==2.8
12 | kiwisolver==1.0.1
13 | Markdown==3.0.1
14 | matplotlib==3.0.2
15 | numpy==1.15.4
16 | numpy-stl==2.9.0
17 | protobuf==3.6.1
18 | pyaml==18.11.0
19 | pygame==1.9.4
20 | pyglet==1.3.2
21 | pyparsing==2.3.0
22 | python-dateutil==2.7.5
23 | python-utils==2.3.0
24 | PyYAML==3.13
25 | requests==2.21.0
26 | scipy==1.2.0
27 | six==1.12.0
28 | tensorboard==1.10.0
29 | tensorflow==1.10.1
30 | termcolor==1.1.0
31 | urllib3==1.24.1
32 | Werkzeug==0.14.1
33 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/curParams.txt:
--------------------------------------------------------------------------------
1 | r0-GetupFront Fit:0.73 Params: 0.205311 0.079244 0.102868 0.027667 -0.009255 0.075025 0.062211 0.132615 0.010617 14.514300 259.929000 -133.612000 124.630000 -21.640400 -92.069900 36.609300 -97.926500 79.847900
2 | r0-SupergetupBack2 Fit:0.98 Params:0.0399 0.2017 0.0666 0.1590 0.0397 0.0401 0.0889 0.0100 0.2235 0.0873 -0.0978 -140.4180 210.9230 19.2741 -33.4796 6.6143 66.0134 -44.8895 38.5104
3 | r4_SupergetupBack2 Fit:0.96 Params: 0.039138 0.185810 0.056746 0.149382 0.033699 0.044710 0.134205 0.008174 0.203374 0.061028 -0.094906 -276.946000 150.609000 37.231800 -13.233500 5.539130 91.178600 -121.382000 81.166600
--------------------------------------------------------------------------------
/SwarmKBSBatchDist.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | thread_number=12
4 | count=`expr $thread_number - 1`
5 |
6 | for trial in 0
7 | do
8 | for comm in 2
9 | do
10 | for i in `seq 0 $count`
11 | do
12 | python3 KiloBotsSplitSwarm/MA3C-Distributed.py --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" &
13 | echo python3 KiloBotsSplitSwarm/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i"
14 | sleep 5
15 | done
16 | wait
17 | sleep 5
18 | mkdir KiloBotsSplitSwarm-"$comm"Comm-Trial"$trial"
19 | mv dist_model train_* KiloBotsSplitSwarm-"$comm"Comm-Trial"$trial"/
20 | done
21 | done
22 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Pyramid.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators.Map import Map
4 | from simulator_geof2.MapGenerators.MapGenerator import MapGenerator
5 | # Simple map, agents on one side, rewards on the other
6 | from simulator_geof2.MapGenerators.Obstacle import Obstacle
7 |
8 |
9 | class Pyramid(MapGenerator):
10 | def generate(self):
11 | map = Map([Obstacle([640, 660], 400, 200)],
12 | [[150, 700]],
13 | [[random.randint(100, 300), random.randint(500, 700)],
14 | [random.randint(440, 840), random.randint(300, 500)],
15 | [random.randint(980, 1180), random.randint(500, 700)]])
16 |
17 | return map
18 |
--------------------------------------------------------------------------------
/BlindGroupUpACBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | for trial in 0 1 2
4 | do
5 | for comm in 0
6 | do
7 | for ac in 1
8 | do
9 | python3 BlindGroupUp/MA3C-LocalThreadsAC.py --num_slaves=3 --comm_size="$comm" --critic="$ac"
10 | sleep 5
11 | mkdir BlindGroupUp-"$comm"Comm-Trial"$trial"-AC"$ac"
12 | mv model train_* BlindGroupUp-"$comm"Comm-Trial"$trial"-AC"$ac"/
13 | done
14 | done
15 | for comm in 5 10 20
16 | do
17 | for ac in 1 2 3
18 | do
19 | python3 BlindGroupUp/MA3C-LocalThreadsAC.py --num_slaves=3 --comm_size="$comm" --critic="$ac"
20 | sleep 5
21 | mkdir BlindGroupUp-"$comm"Comm-Trial"$trial"-AC"$ac"
22 | mv model train_* BlindGroupUp-"$comm"Comm-Trial"$trial"-AC"$ac"/
23 | done
24 | done
25 | done
26 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Dome.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators import Map
4 | from simulator_geof2.MapGenerators import MapGenerator
5 | from simulator_geof2.MapGenerators import Obstacle
6 |
7 |
8 | # The Dome, circle can only get his reward with rectangle's help, 1 reward each
9 | class Dome(MapGenerator):
10 | def generate(self):
11 | map = Map([Obstacle([400, 520], 80, 360), Obstacle([880, 520], 80, 360),
12 | Obstacle([640, 360], 400, 40)],
13 | [[random.randint(100, 300), 700], [random.randint(900, 1100), 700]],
14 | [[random.randint(480, 800), random.randint(600, 700)],
15 | [random.randint(500, 780), random.randint(200, 300)]])
16 |
17 | return map
18 |
--------------------------------------------------------------------------------
/NavACBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | for trial in 0 1 2
4 | do
5 | for comm in 0
6 | do
7 | for ac in 1
8 | do
9 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac"
10 | sleep 5
11 | mkdir Navigation-"$comm"Comm-Trial"$trial"
12 | mv model train_* Navigation-"$comm"Comm-Trial"$trial"/
13 | done
14 | done
15 |
16 | for comm in 5 10 20
17 | do
18 | for ac in 1 2 3
19 | do
20 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac"
21 | sleep 5
22 | mkdir Navigation-"$comm"Comm-Trial"$trial"
23 | mv model train_* Navigation-"$comm"Comm-Trial"$trial"/
24 | done
25 | done
26 | done
27 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/formations/flux9players1.conf:
--------------------------------------------------------------------------------
1 | Begin Flux 35
2 | 0 0 0 50
3 | 1 8.46 -7.5 75
4 | 2 8.46 7.5 75
5 | 3 11 -7.5 65
6 | 4 0 7.5 55
7 | 5 -11 -7.5 30
8 | 6 -11 0 0
9 | 7 -8.59 7.5 40
10 | 8 -8.49 0 20
11 | 9 -4.56 -7.5 45
12 | 10 4.69 -7.5 65
13 | 11 4.69 7.5 65
14 | 12 4.8 -3.37 65
15 | 13 8.48764 3.42669 85
16 | 14 11 -3.43 70
17 | 15 0 3.48 55
18 | 16 -4.53377 -3.42669 45
19 | 17 -8.49 3.61 30
20 | 18 -11 -3.58 25
21 | 19 -11 3.58 25
22 | 20 -8.49 -3.61 30
23 | 21 -4.53377 3.42669 45
24 | 22 0 -3.48 55
25 | 23 11 3.43 70
26 | 24 8.48764 -3.42669 85
27 | 25 4.8 3.37 65
28 | 26 4.85 0 65
29 | 27 8.51 0 95
30 | 28 -4.51 0 40
31 | 29 -4.56 7.5 45
32 | 30 -8.59 -7.5 40
33 | 31 -11 7.5 30
34 | 32 0 -7.5 55
35 | 33 11 7.5 65
36 | 34 11 0 100
37 | End
38 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Basic.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators.Map import Map
4 | from simulator_geof2.MapGenerators.MapGenerator import MapGenerator
5 |
6 |
7 | # Simple map, agents on one side, rewards on the other
8 | class Basic(MapGenerator):
9 |
10 | def generate(self):
11 | if random.random() > 0.5:
12 | map = Map([],
13 | [[random.randint(350, 600), 700], [random.randint(100, 300), 700]],
14 | [[random.randint(700, 1150), random.randint(300, 700)]])
15 | else:
16 | map = Map([],
17 | [[random.randint(950, 1150), 700], [random.randint(700, 900), 700]],
18 | [[random.randint(100, 600), random.randint(300, 700)]])
19 |
20 | return map
21 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/HighPlatform.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators.Map import Map
4 | from simulator_geof2.MapGenerators.MapGenerator import MapGenerator
5 | from simulator_geof2.MapGenerators.Obstacle import Obstacle
6 |
7 |
8 | # High platform on one side of the map
9 | class HighPlatform(MapGenerator):
10 | def generate(self):
11 | if random.random() > 0.5:
12 | map = Map([Obstacle([480, 328], 960, 32)],
13 | [[136, 264]],
14 | [[136, 100], [1100, 272]])
15 | else:
16 | map = Map([Obstacle([800, 328], 960, 32)],
17 | [[1150, 264]],
18 | [[1150, 100], [180, 272]])
19 |
20 | map.is_terminal = lambda positions: any([pos[1] > 700 for pos in positions]) or len(map.rewards) == 0
21 |
22 | return map
23 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/skills/OmniWalk/matrices.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.02,0.0002
3 | 0,1,0.02
4 | 0,0,1
5 | B
6 | 1.333333333e-06
7 | 0.0002
8 | 0.02
9 | C
10 | 1,0,-0.02242609582
11 | Gp
12 | -545.366086,-678.3707782,-790.2638211,-831.5246475,-806.5402476,-738.9257997,-652.7431759,-565.1339444,-485.4375198,-417.068875,-359.9384987,-312.4024894,-272.4814739,-238.4516018,-209.0235659,-183.3089898,-160.7113385,-140.8159967,-123.3089881,-107.9280005,-94.43830505,-82.62390375,-72.28604004,-63.24409067,-55.33634845,-48.41985779,-42.36932724,-37.07546151,-32.44307369,-28.38923642,-24.8416123,-21.73701144,-19.02017025,-16.64272081,-14.56231521,-12.74187367,-11.14893221,-9.755072476,-8.535421391,-7.468211347,-6.53439384,-5.717300361,-5.002345131,-4.376764799,-3.82939063,-3.350449217,-2.931388131,-2.564723404,-2.243906082,-1.963205449,-1.717606841
13 | Kp
14 | 545.366086,9375.063039,1705.361789,51.5574053
15 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/skills/WalkEngine/config/matrices.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.02,0.0002
3 | 0,1,0.02
4 | 0,0,1
5 | B
6 | 1.333333333e-06
7 | 0.0002
8 | 0.02
9 | C
10 | 1,0,-0.02242609582
11 | Gp
12 | -545.366086,-678.3707782,-790.2638211,-831.5246475,-806.5402476,-738.9257997,-652.7431759,-565.1339444,-485.4375198,-417.068875,-359.9384987,-312.4024894,-272.4814739,-238.4516018,-209.0235659,-183.3089898,-160.7113385,-140.8159967,-123.3089881,-107.9280005,-94.43830505,-82.62390375,-72.28604004,-63.24409067,-55.33634845,-48.41985779,-42.36932724,-37.07546151,-32.44307369,-28.38923642,-24.8416123,-21.73701144,-19.02017025,-16.64272081,-14.56231521,-12.74187367,-11.14893221,-9.755072476,-8.535421391,-7.468211347,-6.53439384,-5.717300361,-5.002345131,-4.376764799,-3.82939063,-3.350449217,-2.931388131,-2.564723404,-2.243906082,-1.963205449,-1.717606841
13 | Kp
14 | 545.366086,9375.063039,1705.361789,51.5574053
15 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/skills/WalkEngine/config/matrices19.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.02,0.0002
3 | 0,1,0.02
4 | 0,0,1
5 | B
6 | 1.333333333e-06
7 | 0.0002
8 | 0.02
9 | C
10 | 1,0,-0.01936799185
11 | Gp
12 | -560.315623,-681.5100325,-788.1019744,-831.6032888,-811.5844975,-747.2892178,-660.899359,-569.8602719,-484.9117561,-410.9923631,-349.112657,-298.1587222,-256.2096313,-221.3172244,-191.8619502,-166.6391106,-144.8080736,-125.7946142,-109.1961531,-94.71025118,-82.08927141,-71.11606452,-61.59342655,-53.34099133,-46.19517184,-40.00966321,-34.65542333,-30.01989259,-26.00561677,-22.52855442,-19.51632054,-16.90653503,-14.64536166,-12.68626097,-10.98894442,-9.518500758,-8.244662494,-7.141184076,-6.185309322,-5.357311477,-4.640093816,-4.018841944,-3.480720954,-3.014611888,-2.610882692,-2.261189445,-1.958304023,-1.695964816,-1.468747435,-1.271952764,-1.10151
13 | Kp
14 | 560.315623,9118.256879,1575.035688,49.44479322
15 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/skills/WalkEngine/config/matrices21.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.02,0.0002
3 | 0,1,0.02
4 | 0,0,1
5 | B
6 | 1.333333333e-06
7 | 0.0002
8 | 0.02
9 | C
10 | 1,0,-0.02140672783
11 | Gp
12 | -550.2518148,-679.4774342,-789.8130318,-831.9403071,-808.5906055,-741.9654954,-655.581306,-566.7462581,-485.2920537,-415.1302387,-356.5068764,-307.9216114,-267.3909606,-233.1060194,-203.6685094,-178.0925906,-155.7105978,-136.0639155,-118.8155831,-103.6935533,-90.46008112,-78.89856525,-68.80983023,-60.01224846,-52.34255329,-45.65600646,-39.82565153,-34.74087139,-30.30559231,-26.43642585,-23.06093282,-20.1160951,-17.54701252,-15.30580557,-13.3506905,-11.64519336,-10.15747494,-8.859745447,-7.727753776,-6.740340317,-5.87904505,-5.127764264,-4.472450244,-3.900848847,-3.402270437,-2.967390046,-2.5880731,-2.257223441,-1.96865079,-1.71695514,-1.497425914
13 | Kp
14 | 550.2518148,9293.744209,1662.649329,50.86805736
15 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/skills/WalkEngine/config/matrices23.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.02,0.0002
3 | 0,1,0.02
4 | 0,0,1
5 | B
6 | 1.333333333e-06
7 | 0.0002
8 | 0.02
9 | C
10 | 1,0,-0.02344546381
11 | Gp
12 | -540.5736491,-677.2086304,-790.4685162,-830.7639518,-804.1766593,-735.686234,-649.8216363,-563.5005135,-485.55305,-418.9140222,-363.189871,-316.6230821,-277.257355,-243.4600844,-214.0474036,-188.2198789,-165.4427502,-145.3377898,-127.6091049,-112.0017642,-98.28352999,-86.23949836,-75.6721906,-66.40281588,-58.27184885,-51.13850943,-44.87938699,-39.38661964,-34.56597611,-30.33505577,-26.62170292,-23.36265312,-20.5023885,-17.9921662,-15.78918517,-13.85586367,-12.15920723,-10.67025292,-9.363579673,-8.216876794,-7.210564091,-6.327457875,-5.552477573,-4.872388222,-4.27557451,-3.751842536,-3.292245877,-2.888932954,-2.535013097,-2.22443898,-1.951903446
13 | Kp
14 | 540.5736491,9452.422374,1747.366327,52.23250828
15 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/skills/WalkEngine/config/matrices20.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.02,0.0002
3 | 0,1,0.02
4 | 0,0,1
5 | B
6 | 1.333333333e-06
7 | 0.0002
8 | 0.02
9 | C
10 | 1,0,-0.02038735984
11 | Gp
12 | -555.2339354,-680.5251207,-789.0987047,-831.9783992,-810.2871395,-744.7677024,-658.3103028,-568.326481,-485.1170318,-413.1028418,-352.8969287,-303.1748605,-261.97143,-227.4018236,-197.9569484,-172.5452909,-150.4179957,-131.0636483,-114.1162074,-99.2906265,-86.34509863,-75.06274138,-65.24489393,-56.70994972,-49.29392855,-42.85089375,-37.25257553,-32.38722758,-28.15799809,-24.48111782,-21.28412933,-18.50428465,-16.08715963,-13.98548333,-12.15815633,-10.56942457,-9.188177777,-7.987347393,-6.943385374,-6.0358104,-5.24681162,-4.560902436,-3.964618212,-3.446252678,-2.995628364,-2.603896875,-2.263365243,-1.967344998,-1.710020998,-1.486337416,-1.291898633
13 | Kp
14 | 555.2339354,9208.228254,1619.212779,50.16400976
15 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/skills/WalkEngine/config/matrices22.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.02,0.0002
3 | 0,1,0.02
4 | 0,0,1
5 | B
6 | 1.333333333e-06
7 | 0.0002
8 | 0.02
9 | C
10 | 1,0,-0.02242609582
11 | Gp
12 | -545.366086,-678.3707782,-790.2638211,-831.5246475,-806.5402476,-738.9257997,-652.7431759,-565.1339444,-485.4375198,-417.068875,-359.9384987,-312.4024894,-272.4814739,-238.4516018,-209.0235659,-183.3089898,-160.7113385,-140.8159967,-123.3089881,-107.9280005,-94.43830505,-82.62390375,-72.28604004,-63.24409067,-55.33634845,-48.41985779,-42.36932724,-37.07546151,-32.44307369,-28.38923642,-24.8416123,-21.73701144,-19.02017025,-16.64272081,-14.56231521,-12.74187367,-11.14893221,-9.755072476,-8.535421391,-7.468211347,-6.53439384,-5.717300361,-5.002345131,-4.376764799,-3.82939063,-3.350449217,-2.931388131,-2.564723404,-2.243906082,-1.963205449,-1.717606841
13 | Kp
14 | 545.366086,9375.063039,1705.361789,51.5574053
15 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/skills/WalkEngine/config/matrices24.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.02,0.0002
3 | 0,1,0.02
4 | 0,0,1
5 | B
6 | 1.333333333e-06
7 | 0.0002
8 | 0.02
9 | C
10 | 1,0,-0.0244648318
11 | Gp
12 | -535.8714929,-675.9941843,-790.4432734,-829.687954,-801.5362041,-732.2795566,-646.8381203,-561.8542474,-485.6375717,-420.661915,-366.2608228,-320.5905345,-281.7336038,-248.1523459,-218.7635585,-192.8482182,-169.9247928,-149.644949,-131.7270045,-115.9217723,-101.9993414,-89.74646266,-78.96768365,-69.48668897,-61.14657294,-53.80897927,-47.3524995,-41.67076507,-36.67054664,-32.27002809,-28.39731264,-24.98915485,-21.98988535,-19.35049091,-17.02781809,-14.98387669,-13.18522664,-11.60243642,-10.20960464,-8.983937536,-7.905376373,-6.95626926,-6.121082216,-5.386144965,-4.739427284,-4.170342245,-3.669573083,-3.228920848,-2.841170333,-2.499972076,-2.199738509
13 | Kp
14 | 535.8714929,9526.041279,1788.678772,52.89380546
15 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/others/zerp:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Map.py:
--------------------------------------------------------------------------------
1 | from simulator_geof2.MapGenerators.Obstacle import Obstacle
2 |
3 |
4 | class Map(object):
5 | def __init__(self, obstacles, starting_positions, rewards):
6 | # all maps should be based on 1280x800 screen, as per original Geometry Friends
7 |
8 | # standard map limits
9 | self.obstacles = [Obstacle([640, 780], 1280, 40), Obstacle([640, 20], 1280, 40),
10 | Obstacle([20, 400], 40, 800), Obstacle([1260, 400], 40, 800)]
11 | self.obstacles.extend(obstacles)
12 |
13 | # each map should only spawn as many agents as starting positions are available
14 | self.starting_positions = starting_positions
15 |
16 | # each map should have 3 rewards maximum, for consistency
17 | self.rewards = rewards
18 |
19 | # this function can be overridden for maps that have points of no return
20 | def is_terminal(self, positions):
21 | return len(self.rewards) == 0
22 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Split.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators import Map
4 | from simulator_geof2.MapGenerators import MapGenerator
5 | from simulator_geof2.MapGenerators import Obstacle
6 |
7 |
8 | # split map, circle can only access top corners, rectangle only bottom corners, 1 reward each
9 | class Split(MapGenerator):
10 | def generate(self):
11 | map = Map([Obstacle([400, 590], 80, 220), Obstacle([880, 590], 80, 220),
12 | Obstacle([200, 500], 400, 40), Obstacle([1080, 500], 400, 40)],
13 | [[random.randint(500, 700), 600], [random.randint(500, 700), 700]],
14 | [[random.randint(100, 300), random.randint(600, 700)] if random.random() > 0.5 else
15 | [random.randint(980, 1180), random.randint(600, 700)],
16 | [random.randint(100, 300), random.randint(200, 400)] if random.random() > 0.5 else
17 | [random.randint(980, 1180), random.randint(200, 400)]])
18 |
19 | return map
20 |
--------------------------------------------------------------------------------
/NavParamBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | for trial in 0
4 | do
5 | for param in "10,relu,20,10" "20,relu,40,20" "40,relu,80,40" "60,relu,120,60" "10,elu,20,10" "20,elu,40,20" "40,elu,80,40" "60,elu,120,60" "10,sigmoid,20,10" "20,sigmoid,40,20" "40,sigmoid,80,40" "60,sigmoid,120,60" "10,relu,10,20" "20,relu,20,40" "40,relu,40,80" "60,relu,60,120" "10,elu,10,20" "20,elu,20,40" "40,elu,40,80" "60,elu,60,120" "10,sigmoid,10,20" "20,sigmoid,20,40" "40,sigmoid,40,80" "60,sigmoid,60,120" "10,relu,10" "20,relu,20" "40,relu,40" "60,relu,60" "10,elu,10" "20,elu,20" "40,elu,40" "60,elu,60" "10,sigmoid,10" "20,sigmoid,20" "40,sigmoid,40" "60,sigmoid,60" "10,relu,20,10,10" "20,relu,40,20,20" "40,relu,80,40,40" "60,relu,120,60,60" "10,elu,20,10,10" "20,elu,40,20,20" "40,elu,80,40,40" "60,elu,120,60,60" "10,sigmoid,20,10,10" "20,sigmoid,40,20,20" "40,sigmoid,80,40,40" "60,sigmoid,120,60,60"
6 | do
7 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size=10 --param_search="$param"
8 | sleep 5
9 | mkdir Navigation-10Comm-"$param"-Trial"$trial"
10 | mv model train_* Navigation-10Comm-"$param"-Trial"$trial"/
11 | done
12 | done
13 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/formations/Flux1_3D11.conf:
--------------------------------------------------------------------------------
1 | Begin Flux 51
2 | 0 15.5 5.89 70
3 | 1 15.5 -5.89 70
4 | 2 11.99 0 85
5 | 3 15.5 0 100
6 | 4 -13.73 -1.88 15
7 | 5 -15.5 -1.77 5
8 | 6 15.5 -2.13 85
9 | 7 13.69 2.02 85
10 | 8 13.69 0 95
11 | 9 12.14 -2.31 75
12 | 10 12.14 2.31 75
13 | 11 13.69 -2.02 85
14 | 12 15.5 2.13 85
15 | 13 -15.5 1.77 5
16 | 14 -13.84 0 10
17 | 15 -12.28 1.84 20
18 | 16 -12.28 -1.84 20
19 | 17 -13.73 1.88 15
20 | 18 -15.5 0 0
21 | 19 -12.07 -10.5 30
22 | 20 -12.07 10.5 30
23 | 21 -6.9 -10.5 40
24 | 22 6.47 10.5 60
25 | 23 15.5 -0.98 100
26 | 24 15.5 0.98 100
27 | 25 6.47 -10.5 60
28 | 26 6.43 0 60
29 | 27 -6.9 10.5 40
30 | 28 -15.5 -5.82 25
31 | 29 -12.1 5.82 25
32 | 30 -6.97 -5.71 35
33 | 31 0 5.82 50
34 | 32 6.5 -5.71 60
35 | 33 11.99 5.92 70
36 | 34 11.99 -5.92 70
37 | 35 6.5 5.71 60
38 | 36 0 -5.82 50
39 | 37 -6.97 5.71 35
40 | 38 -12.1 -5.82 25
41 | 39 -15.5 5.82 25
42 | 40 -6.9 0 30
43 | 41 -12.25 0 15
44 | 42 0 0 45
45 | 43 15.5 -10.5 62
46 | 44 -15.5 10.5 30
47 | 45 0.04 -10.5 50
48 | 46 11.74 10.5 65
49 | 47 11.74 -10.5 65
50 | 48 0.04 10.5 50
51 | 49 -15.5 -10.5 30
52 | 50 15.5 10.5 62
53 | End
54 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/matrices.txt:
--------------------------------------------------------------------------------
1 | A
2 | 1,0.00200000000000000004163336,1.99999999999999990949622e-06
3 | 0,1,0.00200000000000000004163336
4 | 0,0,1
5 | B
6 | 1.33333333333333348530717e-09
7 | 1.99999999999999990949622e-06
8 | 0.00200000000000000004163336
9 | C
10 | 1,0,-0.0224489795918367332494547
11 | Kp
12 | 849.454659181923034338979,132965.912681000190787017,20946.2415173261470044963,160.070988582169064784466
13 | Ac
14 | 1.03813764801011898519789,6.96972083248786145048825,0.942415568374252776706612,-0.0152603323079690232633165
15 | -1.13260621224256424165449e-06,0.999822712116425371675632,0.00197207167797689830041064,1.78657201522377445123443e-06
16 | -0.00169890931836384588560218,-0.265931825362000384682659,0.958107516965347683068899,0.00167985802283566196604903
17 | -1.69890931836384617703573,-265.931825362000381574035,-41.8924830346522938384624,0.679858022835661879312852
18 | Bp
19 | -4.48966258503401312719532e-05
20 | 1.33333333333333348530717e-09
21 | 1.99999999999999990949622e-06
22 | 0.00200000000000000004163336
23 | Xp
24 | -155.530912208866539003793
25 | -12172.6977823684283066541
26 | -1838.87025252115540752129
27 | -2.25548245025720417444859
28 | cl
29 | 721573.217986739473417401
30 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/CatchLeft.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | ]>
28 |
29 |
30 |
31 |
32 | &lleg3;=40, &lleg4;=-80, &lleg5;=40, &rleg6;=25, &larm1;=90, &rarm1;=90;
33 | &wait;=1;
34 | &rleg1;=0, &rleg3;=0, &rleg4;=0, &larm1;=90, &rarm1;=90;
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/CatchRight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | ]>
28 |
29 |
30 |
31 |
32 | &rleg3;=40, &rleg4;=-80, &rleg5;=40, &lleg6;=-25, &larm1;=90, &rarm1;=90;
33 | &wait;=3;
34 | &rleg1;=0, &rleg3;=0, &rleg4;=0, &larm1;=-90, &rarm1;=-90;
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/start.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # FC Portugal 3D 2008 binary
3 |
4 | #echo "Launch simulator"
5 | #simspark &
6 | #sleep 3
7 | host="localhost"
8 | if [ $# -gt 0 ]; then
9 | host="${1}"
10 | echo host=$host
11 | fi
12 |
13 |
14 | echo "Launch 1"
15 | build/fcpagent -u 1 -r 0 -h ${host} $2 >/dev/null 2>&1 &
16 | sleep 1
17 | echo "Launch 2"
18 | build/fcpagent -u 2 -r 0 -h ${host} $2 >/dev/null 2>&1 &
19 | sleep 1
20 | echo "Launch 3"
21 | build/fcpagent -u 3 -r 2 -h ${host} $2 >/dev/null 2>&1 &
22 | sleep 1
23 | echo "Launch 4"
24 | build/fcpagent -u 4 -r 4 -h ${host} >/dev/null 2>&1 &
25 | sleep 1
26 | echo "Launch 5"
27 | build/fcpagent -u 5 -r 4 -h ${host} $2 >/dev/null 2>&1 &
28 | sleep 1
29 | echo "Launch 6"
30 | build/fcpagent -u 6 -r 2 -h ${host} $2 >/dev/null 2>&1 &
31 | sleep 1
32 | echo "Launch 7"
33 | build/fcpagent -u 7 -r 4 -h ${host} $2 >/dev/null 2>&1 &
34 | sleep 1
35 | echo "Launch 8"
36 | build/fcpagent -u 8 -r 4 -h ${host} >/dev/null 2>&1 &
37 | sleep 1
38 | echo "Launch 9"
39 | build/fcpagent -u 9 -r 4 -h ${host} $2 >/dev/null 2>&1 &
40 | sleep 1
41 | echo "Launch 10"
42 | build/fcpagent -u 10 -r 4 -h ${host} $2 >/dev/null 2>&1 &
43 | sleep 1
44 | echo "Launch 11"
45 | build/fcpagent -u 11 -r 4 -h ${host} $2 >/dev/null 2>&1 &
46 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/TwoHighTowers.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators import Map
4 | from simulator_geof2.MapGenerators import MapGenerator
5 | # Simple map, agents on one side, rewards on the other
6 | from simulator_geof2.MapGenerators import Obstacle
7 |
8 |
9 | class TwoHighTowers(MapGenerator):
10 | def generate(self):
11 | rndm = random.random()
12 | if rndm > 0.5:
13 | map = Map([Obstacle([400, 570], 80, 380), Obstacle([880, 650], 80, 300)],
14 | [[random.randint(100, 200), 400], [random.randint(200, 300), 700]],
15 | [[random.randint(500, 700), random.randint(350, 700)],
16 | [random.randint(1000, 1100), random.randint(350, 700)],
17 | [880, random.randint(150, 300)]])
18 | else:
19 | map = Map([Obstacle([880, 570], 80, 380), Obstacle([400, 650], 80, 300)],
20 | [[random.randint(1100, 1200), 400], [random.randint(980, 1080), 700]],
21 | [[random.randint(500, 700), random.randint(350, 700)],
22 | [random.randint(100, 200), random.randint(350, 700)],
23 | [400, random.randint(150, 300)]])
24 |
25 | return map
26 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Corners.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators.Map import Map
4 | from simulator_geof2.MapGenerators.MapGenerator import MapGenerator
5 | # Simple map, agents on one side, rewards on the other
6 | from simulator_geof2.MapGenerators.Obstacle import Obstacle
7 |
8 |
9 | class Corners(MapGenerator):
10 | def generate(self):
11 | if random.random() > 0.5:
12 | map = Map([Obstacle([136, 552], 192, 448), Obstacle([1072, 672], 336, 176)],
13 | [[random.randint(80, 180), 264]],
14 | [[random.randint(300, 550), random.randint(500, 700)],
15 | [random.randint(650, 850), random.randint(500, 700)],
16 | [random.randint(930, 1230), random.randint(300, 500)]])
17 | else:
18 | map = Map([Obstacle([1144, 552], 192, 448), Obstacle([208, 672], 336, 176)],
19 | [[random.randint(1000, 1200), 264]],
20 | [[random.randint(750, 950), random.randint(500, 700)],
21 | [random.randint(400, 650), random.randint(500, 700)],
22 | [random.randint(50, 350), random.randint(300, 500)]])
23 |
24 | return map
25 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/getup/GetUpSideLeftNewModel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/getup/GetUpSideRightNewModel.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/PursuitACBatchDist.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | thread_number=12
4 | count=`expr $thread_number - 1`
5 |
6 | for trial in 0 1 2
7 | do
8 |
9 | for comm in 10 20 5
10 | do
11 | for ac in 1 2 3 0
12 | do
13 | for i in `seq 0 $count`
14 | do
15 | python3 Pursuit/MA3C-Distributed.py --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" --critic="$ac" &
16 | echo python3 A3C/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i" --critic="$ac"
17 | sleep 5
18 | done
19 | wait
20 | sleep 5
21 | mkdir Pursuit-"$comm"Comm-Trial"$trial"-AC"$ac"
22 | mv dist_model train_* Pursuit-"$comm"Comm-Trial"$trial"-AC"$ac"/
23 | done
24 | done
25 |
26 | for comm in 0
27 | do
28 | for ac in 1 0
29 | do
30 | for i in `seq 0 $count`
31 | do
32 | python3 Pursuit/MA3C-Distributed.py --comm_size="$comm" --slaves_per_url="$thread_number" --urls=localhost --task_index="$i" --critic="$ac" &
33 | echo python3 A3C/MA3C-Distributed.py --task_max="$thread_number" --task_index="$i" --critic="$ac"
34 | sleep 5
35 | done
36 | wait
37 | sleep 5
38 | mkdir Pursuit-"$comm"Comm-Trial"$trial"-AC"$ac"
39 | mv dist_model train_* Pursuit-"$comm"Comm-Trial"$trial"-AC"$ac"/
40 | done
41 | done
42 | done
43 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Obstacle.py:
--------------------------------------------------------------------------------
1 | class Obstacle(object):
2 | # Define an obstacle by defining coordinates of top-left corner and bottom-right corners
3 | # Obstacle( [0, 0], [10, 20])
4 | def __init__(self, top_left, bottom_right):
5 | self.top_y = top_left[1]
6 | self.bot_y = bottom_right[1]
7 | self.left_x = top_left[0]
8 | self.right_x = bottom_right[0]
9 |
10 | self.half_width = int((self.right_x-self.left_x)/2)
11 | self.half_height = int((self.bot_y-self.top_y)/2)
12 | self.center_x = self.left_x+self.half_width
13 | self.center_y = self.top_y+self.half_height
14 |
15 | # Define an obstacle by defining coordinates of center, and its width and height
16 | # Obstacle( [5, 10], 10, 20)
17 | def __init__(self, center, width, height):
18 | self.half_width = int(width/2)
19 | self.half_height = int(height/2)
20 | self.center_x = center[0]
21 | self.center_y = center[1]
22 |
23 | self.top_y = self.center_y - self.half_height
24 | self.bot_y = self.center_y + self.half_height
25 | self.left_x = self.center_x - self.half_width
26 | self.right_x = self.center_x + self.half_width
27 |
28 | def __str__(self):
29 | return "Obstacle([" + str(self.left_x) + "," + str(self.top_y) + "],[" + \
30 | str(self.right_x) + "," + str(self.bot_y) + "])"
31 |
--------------------------------------------------------------------------------
/simulator_geof2/Simulator/Utils.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 |
3 |
4 | # get distance between points A and B
5 | def distance(a, b):
6 | return np.sqrt((a[0] - b[0]) ** 2 + (a[1] - b[1]) ** 2)
7 |
8 |
9 | # calculate new speed value when ball hits something
10 | def bounce_speed(speed):
11 | speed *= 100
12 | bounce_spd = 0.0001 * speed ** 2 - 0.3785 * speed - 0.5477
13 | if abs(bounce_spd) < 1.3:
14 | bounce_spd = 0
15 | else:
16 | bounce_spd /= 100
17 | return bounce_spd
18 |
19 |
20 | # returns whether a rectangle with center at rectangle_pos and rectangle_size=[width,height]
21 | # intersects a circle at reward_pos with radius reward_radius
22 | def intersects(rectangle_pos, rectangle_size, reward_pos, reward_radius):
23 | circle_distance = [abs(reward_pos[0] - rectangle_pos[0]), abs(reward_pos[1] - rectangle_pos[1])]
24 |
25 | if circle_distance[0] > rectangle_size[0] / 2 + reward_radius:
26 | return False
27 | if circle_distance[1] > rectangle_size[1] / 2 + reward_radius:
28 | return False
29 |
30 | if circle_distance[0] <= rectangle_size[0] / 2:
31 | return True
32 | if circle_distance[1] <= rectangle_size[1] / 2:
33 | return True
34 |
35 | corner_distance_sq = (circle_distance[0] - rectangle_size[0] / 2) ** 2 + \
36 | (circle_distance[1] - rectangle_size[1] / 2) ** 2
37 |
38 | return corner_distance_sq <= reward_radius ** 2
39 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/kick/KickLeft2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | ]>
28 |
29 |
30 |
31 |
32 | &lleg3; = 7:.1, &rleg3; = 7:.1, &lleg6; = -7:.1, &rleg6; = -7:.1;
33 | &lleg2; = 20:-1, &lleg4; = -70, &lleg5; = 50:-1;
34 | &lleg4; = -60, &lleg5;= 40:-1;
35 | &lleg2; = -20;
36 | &lleg2; = 90:100;
37 | &wait; = 1;
38 | &lleg2; = 20;
39 | &lleg2; = 0:1, &lleg4; = 0:2, &lleg5; = 0:1;
40 | &lleg3; = 0:.1, &rleg3; = 0:.1, &lleg6; = 0:.1, &rleg6; = 0:.1;
41 |
42 |
43 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/TwoFloors.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators import Map
4 | from simulator_geof2.MapGenerators import MapGenerator
5 | from simulator_geof2.MapGenerators import Obstacle
6 |
7 |
8 | # High platform on one side of the map
9 | class TwoFloors(MapGenerator):
10 | def generate(self):
11 | rndm = random.random()
12 | if rndm > 0.5:
13 | map = Map([Obstacle([200, 500], 320, 40), Obstacle([840, 500], 800, 40),
14 | Obstacle([440, 260], 800, 40), Obstacle([1080, 260], 320, 40)],
15 | [[200, 160] if random.random() > 0.5 else [1080, 160]],
16 | [[1000, 100] if random.random() > 0.5 else [200, 100],
17 | [1000, 380] if random.random() > 0.5 else [200, 380],
18 | [1000, 600] if random.random() > 0.5 else [200, 600]])
19 | else:
20 | map = Map([Obstacle([200, 260], 320, 40), Obstacle([840, 260], 800, 40),
21 | Obstacle([440, 500], 800, 40), Obstacle([1080, 500], 320, 40)],
22 | [[200, 160] if random.random() > 0.5 else [1080, 160]],
23 | [[1000, 100] if random.random() > 0.5 else [200, 100],
24 | [1000, 380] if random.random() > 0.5 else [200, 380],
25 | [1000, 600] if random.random() > 0.5 else [200, 600]])
26 |
27 | map.is_terminal = lambda positions: (any([pos[1] > 660 for pos in positions]) and len(map.rewards) > 0 and
28 | map.rewards[-1][1] < 500) or len(map.rewards) == 0
29 |
30 | return map
31 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/GoalieHockeyGround.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/simulator_geof2/Players/Agent.py:
--------------------------------------------------------------------------------
1 | from abc import ABC, abstractmethod
2 |
3 |
4 | class Agent(ABC):
5 | # Executes an action on the environment
6 | @abstractmethod
7 | def step(self, action):
8 | return
9 |
10 | # Moves the agent outside of obstacles.
11 | # If agent collision is enabled, this is first called against other agents, then against actual obstacles,
12 | # then agents again with forbidden moves. Otherwise, its only called against actual obstacles
13 | # forbidden_moves=[Right, Left, Down, Up] is an array of directions the agent can no longer move to
14 | @abstractmethod
15 | def clear_out_of_obstacles(self, obstacles, forbidden_moves=[False, False, False, False]):
16 | return False
17 |
18 | # Returns a list of rewards the agent is intersecting with
19 | @abstractmethod
20 | def check_rewards(self, rewards):
21 | return []
22 |
23 | # Returns the agent's state (like position or other known variables)
24 | # Obstacles and rewards are added later by the environment
25 | @abstractmethod
26 | def get_state(self):
27 | return None
28 |
29 | # Returns the agent's state (like position) relevant for other agents
30 | @abstractmethod
31 | def get_external_state(self):
32 | return None
33 |
34 | # Renders the agent on a PyGame screen
35 | @abstractmethod
36 | def render(self, screen):
37 | return
38 |
39 | # Reset agents variables
40 | @abstractmethod
41 | def reset(self, obstacles):
42 | return
43 |
44 | # Returns the agent's shape in terms of obstacles that other agents collide with
45 | @abstractmethod
46 | def get_obstacle_body(self):
47 | return []
48 |
49 |
50 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/TwoTowers.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators.Map import Map
4 | from simulator_geof2.MapGenerators.MapGenerator import MapGenerator
5 | # Simple map, agents on one side, rewards on the other
6 | from simulator_geof2.MapGenerators.Obstacle import Obstacle
7 |
8 |
9 | class TwoTowers(MapGenerator):
10 | def generate(self):
11 | rndm = random.random()
12 | if rndm > 0.67:
13 | map = Map([Obstacle([400, 620], 80, 280), Obstacle([880, 620], 80, 280)],
14 | [[200, 700]],
15 | [[random.randint(500, 700), random.randint(350, 700)] if random.random() > 0.5 else
16 | [random.randint(900, 1100), random.randint(350, 700)],
17 | [400, random.randint(150, 400)], [800, random.randint(150, 400)]])
18 | elif rndm > 0.33:
19 | map = Map([Obstacle([400, 620], 80, 280), Obstacle([880, 620], 80, 280)],
20 | [[600, 700]],
21 | [[random.randint(100, 300), random.randint(350, 700)] if random.random() > 0.5 else
22 | [random.randint(900, 1100), random.randint(350, 700)],
23 | [400, random.randint(150, 400)], [800, random.randint(150, 400)]])
24 | else:
25 | map = Map([Obstacle([400, 620], 80, 280), Obstacle([880, 620], 80, 280)],
26 | [[1080, 700]],
27 | [[random.randint(500, 700), random.randint(350, 700)] if random.random() > 0.5 else
28 | [random.randint(100, 300), random.randint(350, 700)],
29 | [400, random.randint(150, 400)], [800, random.randint(150, 400)]])
30 |
31 | return map
32 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/kick/KickSideRightKungFu.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Asynchronous Advantage Actor-Centralized-Critic with Communication (A3C3)
2 |
3 | A distributed asynchronous actor-critic algorithm in a multi-agent setting with differentiable communication and a centralized
4 | critic.
5 |
6 | Check out learned policies here: https://youtu.be/fB71yKcP3iU
7 |
8 | 
9 |
10 | Contains 4 environment suites:
11 |
12 | - POC Suite: Hidden Reward, Navigation, Pursuit, Traffic Intersection
13 | - MPE Suite: Cooperative Navigation, Cooperative Communication, Cooperative Reference, Tag
14 | - KiloBot Suite: Light, Join, Split
15 | - 3d Soccer Simulation Suite: Passing, Keep-Away
16 |
17 | Also contains scripts to launch A3C3 and learn policies. Use the `requirements.txt` to install your dependencies and run the scripts.
18 |
19 | Each agent is defined by 3 networks.
20 |
21 | 
22 |
23 | The algorithm is distributed, and multiple workers update the networks.
24 |
25 | 
26 |
27 | The actor network learns a local policy.
28 |
29 | 
30 |
31 | The centralized critic evaluates the policy.
32 |
33 | 
34 |
35 | The communicator network learns a communication protocol between agents.
36 |
37 | 
38 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/RotateAroundRight.xml.bak:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 28.44;
41 | &rleg3;: &1; . 0 28.44;
42 |
43 | &lleg4;: &2; . 0 -46.33;
44 | &rleg4;: -&2; . 0 -46.33;
45 |
46 | &lleg5;: -&1; . 0 31;
47 | &rleg5;: &1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 0;
53 | &rleg1;: -&4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | tbFromServer.sh
2 | .idea
3 | # Byte-compiled / optimized / DLL files
4 | __pycache__/
5 | *.py[cod]
6 | *$py.class
7 |
8 | # C extensions
9 | *.so
10 |
11 | # Distribution / packaging
12 | .Python
13 | build/
14 | develop-eggs/
15 | dist/
16 | downloads/
17 | eggs/
18 | .eggs/
19 | lib/
20 | lib64/
21 | parts/
22 | sdist/
23 | var/
24 | wheels/
25 | *.egg-info/
26 | .installed.cfg
27 | *.egg
28 | MANIFEST
29 |
30 | # PyInstaller
31 | # Usually these files are written by a python script from a template
32 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
33 | *.manifest
34 | *.spec
35 |
36 | # Installer logs
37 | pip-log.txt
38 | pip-delete-this-directory.txt
39 |
40 | # Unit test / coverage reports
41 | htmlcov/
42 | .tox/
43 | .coverage
44 | .coverage.*
45 | .cache
46 | nosetests.xml
47 | coverage.xml
48 | *.cover
49 | .hypothesis/
50 | .pytest_cache/
51 |
52 | # Translations
53 | *.mo
54 | *.pot
55 |
56 | # Django stuff:
57 | *.log
58 | local_settings.py
59 | db.sqlite3
60 |
61 | # Flask stuff:
62 | instance/
63 | .webassets-cache
64 |
65 | # Scrapy stuff:
66 | .scrapy
67 |
68 | # Sphinx documentation
69 | docs/_build/
70 |
71 | # PyBuilder
72 | target/
73 |
74 | # Jupyter Notebook
75 | .ipynb_checkpoints
76 |
77 | # pyenv
78 | .python-version
79 |
80 | # celery beat schedule file
81 | celerybeat-schedule
82 |
83 | # SageMath parsed files
84 | *.sage.py
85 |
86 | # Environments
87 | .env
88 | .venv
89 | env/
90 | venv/
91 | ENV/
92 | env.bak/
93 | venv.bak/
94 |
95 | # Spyder project settings
96 | .spyderproject
97 | .spyproject
98 |
99 | # Rope project settings
100 | .ropeproject
101 |
102 | # mkdocs documentation
103 | /site
104 |
105 | # mypy
106 | .mypy_cache/
107 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/formations/KeepAway.conf:
--------------------------------------------------------------------------------
1 | Formation DelaunayTriangulation N3
2 | Begin Roles
3 | 1 Goalie 0
4 | 2 CenterBack -1
5 | 3 CenterBack 2
6 | 4 SideBack -1
7 | 5 SideBack 4
8 | 6 DefensiveHalf 0
9 | 7 OffensiveHalf -1
10 | 8 OffensiveHalf 7
11 | 9 SideForward -1
12 | 10 SideForward 9
13 | 11 CenterForward 0
14 | End Roles
15 | Begin Samples 2 6
16 | ----- 0 -----
17 | Ball -15.5 10.5
18 | 1 -13.7 0
19 | 2 -12.1 -1.64
20 | 3 -12.27 2.47
21 | 4 -12.4 -5.36
22 | 5 -12.53 6.28
23 | 6 -10.23 0.36
24 | 7 -8.06 -4.14
25 | 8 -8.19 5.56
26 | 9 -2.33 -5.13
27 | 10 -1.41 7.27
28 | 11 -3.85 1.12
29 | ----- 1 -----
30 | Ball -15.5 -10.5
31 | 1 -13.7 -0
32 | 2 -12.27 -2.47
33 | 3 -12.1 1.64
34 | 4 -12.53 -6.28
35 | 5 -12.4 5.36
36 | 6 -10.23 -0.36
37 | 7 -8.19 -5.56
38 | 8 -8.06 4.14
39 | 9 -1.41 -7.27
40 | 10 -2.33 5.13
41 | 11 -3.85 -1.12
42 | ----- 2 -----
43 | Ball 0.2 0
44 | 1 -13.7 0
45 | 2 -10.82 -2.1
46 | 3 -10.82 2.1
47 | 4 -6.68 -6.91
48 | 5 -6.68 6.91
49 | 6 -5.16 -0.1
50 | 7 6.25 -3.65
51 | 8 6.25 3.65
52 | 9 10.65 -7.56
53 | 10 10.65 7.56
54 | 11 11.12 0.13
55 | ----- 3 -----
56 | Ball 15.5 0
57 | 1 -13.7 0
58 | 2 -4.11 -2.46
59 | 3 -4.11 2.46
60 | 4 -2.91 -5.92
61 | 5 -2.91 5.92
62 | 6 2.76 0
63 | 7 10.46 -2.3
64 | 8 10.46 2.3
65 | 9 13.02 -4.04
66 | 10 13.02 4.04
67 | 11 13.02 -0.23
68 | ----- 4 -----
69 | Ball 15.5 10.5
70 | 1 -13.7 -0
71 | 2 -4.11 -1.87
72 | 3 -4.11 3.06
73 | 4 -2.66 -5.03
74 | 5 -3.16 6.81
75 | 6 2.76 0.56
76 | 7 8.45 -0.07
77 | 8 7.89 8.71
78 | 9 12.1 -2.37
79 | 10 13.61 9.24
80 | 11 11.84 1.97
81 | ----- 5 -----
82 | Ball 15.5 -10.5
83 | 1 -13.7 0
84 | 2 -4.11 -3.06
85 | 3 -4.11 1.87
86 | 4 -3.16 -6.81
87 | 5 -2.66 5.03
88 | 6 2.76 -0.56
89 | 7 7.89 -8.71
90 | 8 8.45 0.07
91 | 9 13.61 -9.24
92 | 10 12.1 2.37
93 | 11 11.84 -1.97
94 | End Samples
95 | Begin Player With Ball Samples 0
96 | End Player With Ball Samples
97 | End
98 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/kick/ImprovedSlotBehaviorExample.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/MiniWalk.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 | &larm1;: 0 . 0 -90;
37 | &rarm1;: 0 . 0 -90;
38 |
39 | &lleg2;: &1; . 0 60, -&4; . 1.570796327 0;
40 | &rleg2;: -&1; . 0 60, &4; . 1.570796327 0;
41 |
42 | &lleg4;: -&2; . 0 -50;
43 | &rleg4;: &2; . 0 -50;
44 |
45 | &lleg5;: &1; . 0 18, &4; . 1.570796327 0;
46 | &rleg5;: -&1; . 0 18, -&4; . 1.570796327 0;
47 |
48 |
49 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/FootUp.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/simulator_geof2/MapGenerators/Floors.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | from simulator_geof2.MapGenerators import Map
4 | from simulator_geof2.MapGenerators import MapGenerator
5 | from simulator_geof2.MapGenerators import Obstacle
6 |
7 |
8 | # High platform on one side of the map
9 | class Floors(MapGenerator):
10 | def generate(self):
11 | rndm = random.random()
12 | if rndm > 0.67:
13 | map = Map([Obstacle([320, 500], 560, 40), Obstacle([960, 500], 560, 40)],
14 | [[200, 450] if random.random() > 0.5 else [1080, 450]],
15 | [[random.randint(100, 600) if random.random() > 0.5 else random.randint(700, 1100),
16 | random.randint(300, 450)],
17 | [random.randint(700, 1100) if random.random() > 0.5 else random.randint(100, 600),
18 | random.randint(600, 720)]])
19 | map.is_terminal = lambda positions: (any([pos[1] > 660 for pos in positions]) and len(map.rewards) > 0 and
20 | map.rewards[-1][1] < 500) or len(map.rewards) == 0
21 | elif rndm > 0.33:
22 | map = Map([Obstacle([320, 500], 560, 40), Obstacle([960, 500], 560, 40)],
23 | [[200, 450] if random.random() > 0.5 else [1080, 450]],
24 | [[random.randint(100, 600), random.randint(300, 450)],
25 | [random.randint(700, 1100), random.randint(300, 450)]])
26 | map.is_terminal = lambda positions: any([pos[1] > 660 for pos in positions]) or len(map.rewards) == 0
27 | else:
28 | map = Map([Obstacle([320, 500], 560, 40), Obstacle([960, 500], 560, 40)],
29 | [[200, 450] if random.random() > 0.5 else [1080, 450]],
30 | [[random.randint(700, 1100), random.randint(600, 750)]])
31 |
32 | return map
33 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroWalkForKick.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/getup/ContFallBack.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 | \
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotateRightF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 28.44;
41 | &rleg3;: &1; . 0 28.44;
42 |
43 | &lleg4;: &2; . 0 -46.33;
44 | &rleg4;: -&2; . 0 -46.33;
45 |
46 | &lleg5;: -&1; . 0 31;
47 | &rleg5;: &1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 -10;
53 | &rleg1;: -&4; . 1.570796327 -10;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/formations/normal_formation_3D_9Players.conf:
--------------------------------------------------------------------------------
1 | Formation DelaunayTriangulation 3D
2 | Begin Roles
3 | 1 Goalie 0
4 | 2 CenterBack 0
5 | 3 SideBack -1
6 | 4 SideBack 3
7 | 5 DefensiveHalf 0
8 | 6 OffensiveHalf -1
9 | 7 OffensiveHalf 6
10 | 8 SideForward -1
11 | 9 SideForward 8
12 | End Roles
13 | Begin Samples 2 8
14 | ----- 0 -----
15 | Ball -5.01 0
16 | 1 -10.3 0
17 | 2 -6.83 -0.03
18 | 3 -6.99 -1.85
19 | 4 -6.99 1.85
20 | 5 -2.62 0
21 | 6 -4.03 -3.15
22 | 7 -4.03 3.15
23 | 8 1.68 -2.13
24 | 9 1.68 2.13
25 | ----- 1 -----
26 | Ball 0 0
27 | 1 -10.3 0
28 | 2 -4.61 -0.03
29 | 3 -4.59 -2.27
30 | 4 -4.59 2.27
31 | 5 -1 0
32 | 6 -1 -3
33 | 7 -1 3
34 | 8 2.58 -1.79
35 | 9 2.58 1.79
36 | ----- 2 -----
37 | Ball -11 -7.5
38 | 1 -10.3 0
39 | 2 -10.12 -2.35
40 | 3 -10.6 -4.9
41 | 4 -8.78 0.13
42 | 5 -5.25 -1.37
43 | 6 -7.88 -4.16
44 | 7 -7.43 2.48
45 | 8 -2.74 -4.53
46 | 9 0.05 0.5
47 | ----- 3 -----
48 | Ball -11 0
49 | 1 -10.3 0
50 | 2 -8.51 0.05
51 | 3 -10.02 -3.4
52 | 4 -10.02 3.4
53 | 5 -4.56 0
54 | 6 -7.65 -3.32
55 | 7 -7.65 3.32
56 | 8 0.6 -2.54
57 | 9 0.6 2.54
58 | ----- 4 -----
59 | Ball -11 7.5
60 | 1 -10.3 -0
61 | 2 -10.12 2.35
62 | 3 -8.78 -0.13
63 | 4 -10.6 4.9
64 | 5 -5.25 1.37
65 | 6 -7.43 -2.48
66 | 7 -7.88 4.16
67 | 8 0.05 -0.5
68 | 9 -2.74 4.53
69 | ----- 5 -----
70 | Ball 11 -7.5
71 | 1 -10.3 0
72 | 2 0.4 -1.58
73 | 3 -2.45 -4.03
74 | 4 -2.19 0.32
75 | 5 7.49 -2.4
76 | 6 3.24 -6.25
77 | 7 4.16 -4.09
78 | 8 7.38 -4.74
79 | 9 7.83 0.42
80 | ----- 6 -----
81 | Ball 11 0
82 | 1 -10.3 0
83 | 2 2.53 0.08
84 | 3 -2.32 -2.18
85 | 4 -2.32 2.18
86 | 5 7.49 0.13
87 | 6 6.25 -2.58
88 | 7 6.25 2.58
89 | 8 8.91 -1.13
90 | 9 8.91 1.13
91 | ----- 7 -----
92 | Ball 11 7.5
93 | 1 -10.3 -0
94 | 2 0.4 1.58
95 | 3 -2.19 -0.32
96 | 4 -2.45 4.03
97 | 5 7.49 2.4
98 | 6 4.16 4.09
99 | 7 3.24 6.25
100 | 8 7.83 -0.42
101 | 9 7.38 4.74
102 | End Samples
103 | Begin Player With Ball Samples 0
104 | End Player With Ball Samples
105 | End
106 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/getup/ContFallFront.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | \
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotAroundRight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 28.44;
41 | &rleg3;: &1; . 0 28.44;
42 |
43 | &lleg4;: &2; . 0 -46.33;
44 | &rleg4;: -&2; . 0 -46.33;
45 |
46 | &lleg5;: -&1; . 0 31;
47 | &rleg5;: &1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 0;
53 | &rleg1;: -&4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotAroundRightF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 28.44;
41 | &rleg3;: &1; . 0 28.44;
42 |
43 | &lleg4;: &2; . 0 -46.33;
44 | &rleg4;: -&2; . 0 -46.33;
45 |
46 | &lleg5;: -&1; . 0 31;
47 | &rleg5;: &1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 0;
53 | &rleg1;: -&4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotAroundRightS.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 28.44;
41 | &rleg3;: &1; . 0 28.44;
42 |
43 | &lleg4;: &2; . 0 -46.33;
44 | &rleg4;: -&2; . 0 -46.33;
45 |
46 | &lleg5;: -&1; . 0 31;
47 | &rleg5;: &1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 0;
53 | &rleg1;: -&4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotAroundLeft.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: &1; . 0 28.44;
41 | &rleg3;: -&1; . 0 28.44;
42 |
43 | &lleg4;: -&2; . 0 -46.33;
44 | &rleg4;: &2; . 0 -46.33;
45 |
46 | &lleg5;: &1; . 0 31;
47 | &rleg5;: -&1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 0;
53 | &rleg1;: -&4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotAroundLeftF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: &1; . 0 28.44;
41 | &rleg3;: -&1; . 0 28.44;
42 |
43 | &lleg4;: -&2; . 0 -46.33;
44 | &rleg4;: &2; . 0 -46.33;
45 |
46 | &lleg5;: &1; . 0 31;
47 | &rleg5;: -&1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 0;
53 | &rleg1;: -&4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotAroundLeftS.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: &1; . 0 28.44;
41 | &rleg3;: -&1; . 0 28.44;
42 |
43 | &lleg4;: -&2; . 0 -46.33;
44 | &rleg4;: &2; . 0 -46.33;
45 |
46 | &lleg5;: &1; . 0 31;
47 | &rleg5;: -&1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 0;
53 | &rleg1;: -&4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/NavCommsBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | for trial in 0
4 | do
5 | for comm in 20
6 | do
7 | for ac in 3
8 | do
9 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --comm_delivery_failure_chance=0.5
10 | sleep 5
11 | mkdir Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-Loss
12 | mv model train_* Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-Loss/
13 | done
14 | done
15 | done
16 |
17 | for trial in 1
18 | do
19 | for comm in 20
20 | do
21 | for ac in 3
22 | do
23 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --comm_gaussian_noise=0.5
24 | sleep 5
25 | mkdir Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-Noise
26 | mv model train_* Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-Noise/
27 | done
28 | done
29 | done
30 |
31 | for trial in 2
32 | do
33 | for comm in 20
34 | do
35 | for ac in 3
36 | do
37 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --comm_jumble_chance=0.5
38 | sleep 5
39 | mkdir Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-Jumble
40 | mv model train_* Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"/-Jumble
41 | done
42 | done
43 | done
44 |
45 | for trial in 3
46 | do
47 | for comm in 20
48 | do
49 | for ac in 3
50 | do
51 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --comm_delivery_failure_chance=0.5 --comm_gaussian_noise=0.5 --comm_jumble_chance=0.5
52 | sleep 5
53 | mkdir Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-All
54 | mv model train_* Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-All/
55 | done
56 | done
57 | done
58 |
59 | for trial in 4
60 | do
61 | for comm in 20
62 | do
63 | for ac in 3
64 | do
65 | python3 Navigation/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm"
66 | sleep 5
67 | mkdir Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-None
68 | mv model train_* Navigation-"$comm"Comm-AC"$ac"-Trial"$trial"-None/
69 | done
70 | done
71 | done
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroJoints.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroKick.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
55 |
56 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroTest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroOptPosition.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroPosition.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotateLeft.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | ]>
35 |
36 |
37 |
38 |
39 | &lleg2;: -&3; . &p2; 0;
40 | &rleg2;: &3; . &p2; 0;
41 |
42 | &lleg3;: -&1; . &p1; 28.44;
43 | &rleg3;: &1; . &p1; 28.44;
44 |
45 | &lleg4;: &2; . &p1; -46.33;
46 | &rleg4;: -&2; . &p1; -46.33;
47 |
48 | &lleg5;: -&1; . &p1; 31;
49 | &rleg5;: &1; . &p1; 31;
50 |
51 | &lleg6;: &3; . &p2; 0;
52 | &rleg6;: -&3; . &p2; 0;
53 |
54 | &lleg1;: -&4; . &p2; -10;
55 | &rleg1;: -&4; . &p2; -10;
56 |
57 | &larm1;: 0 . &p1; -90;
58 | &rarm1;: 0 . &p1; -90;
59 |
60 |
61 | .
62 |
63 |
64 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotateLeftS.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | ]>
35 |
36 |
37 |
38 |
39 | &lleg2;: -&3; . &p2; 0;
40 | &rleg2;: &3; . &p2; 0;
41 |
42 | &lleg3;: -&1; . &p1; 28.44;
43 | &rleg3;: &1; . &p1; 28.44;
44 |
45 | &lleg4;: &2; . &p1; -46.33;
46 | &rleg4;: -&2; . &p1; -46.33;
47 |
48 | &lleg5;: -&1; . &p1; 31;
49 | &rleg5;: &1; . &p1; 31;
50 |
51 | &lleg6;: &3; . &p2; 0;
52 | &rleg6;: -&3; . &p2; 0;
53 |
54 | &lleg1;: -&4; . &p2; -10;
55 | &rleg1;: -&4; . &p2; -10;
56 |
57 | &larm1;: 0 . &p1; -90;
58 | &rarm1;: 0 . &p1; -90;
59 |
60 |
61 | .
62 |
63 |
64 |
--------------------------------------------------------------------------------
/TrafficCommsBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | for trial in 0
4 | do
5 | for comm in 5
6 | do
7 | for ac in 0 1 2 3
8 | do
9 | python3 Traffic/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac" --comm_delivery_failure_chance=0.5
10 | mkdir Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-Loss
11 | mv model train_* Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-Loss/
12 | done
13 | done
14 | done
15 |
16 | for trial in 1
17 | do
18 | for comm in 5
19 | do
20 | for ac in 0 1 2 3
21 | do
22 | python3 Traffic/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac" --comm_gaussian_noise=0.5
23 | sleep 5
24 | mkdir Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-Noise
25 | mv model train_* Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-Noise/
26 | done
27 | done
28 | done
29 |
30 | for trial in 2
31 | do
32 | for comm in 5
33 | do
34 | for ac in 0 1 2 3
35 | do
36 | python3 Traffic/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac" --comm_jumble_chance=0.5
37 | sleep 5
38 | mkdir Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-Jumble
39 | mv model train_* Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-Jumble/
40 | done
41 | done
42 | done
43 |
44 | for trial in 3
45 | do
46 | for comm in 5
47 | do
48 | for ac in 0 1 2 3
49 | do
50 | python3 Traffic/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac" --comm_delivery_failure_chance=0.5 --comm_gaussian_noise=0.5 --comm_jumble_chance=0.5
51 | sleep 5
52 | mkdir Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-All
53 | mv model train_* Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-All/
54 | done
55 | done
56 | done
57 |
58 | for trial in 4
59 | do
60 | for comm in 5
61 | do
62 | for ac in 0 1 2 3
63 | do
64 | python3 Traffic/MA3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac"
65 | sleep 5
66 | mkdir Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-None
67 | mv model train_* Traffic-"$comm"Comm-AC"$ac"-Trial"$trial"-None/
68 | done
69 | done
70 | done
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/GoalieHockeyStepRight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg1;: &0; . 3.14 -90;
38 | &rleg1;: &0; . 0 -90;
39 |
40 | &lleg2;: &0; . 3.14 45;
41 | &rleg2;: &0; . 1.57 -45;
42 |
43 | &lleg3;: &3; . -4.71 76.5;
44 | &rleg3;: &3; . 3.14 76.5;
45 |
46 | &lleg4;: &0; . -1.570796327 -100;
47 | &rleg4;: &0; . 0 -100;
48 |
49 | &lleg5;: &0; . -4.71 -45;
50 | &rleg5;: &0; . 3.14 -45;
51 |
52 | &lleg6;: &0; . -1.57 -25;
53 | &rleg6;: &0; . 0 25;
54 |
55 | &larm1;: &0; . 0 20;
56 | &rarm1;: &0; . 1.57070 20;
57 |
58 | &larm2;: &4; . 0 30;
59 | &rarm2;: &4; . 3.14 -30;
60 |
61 |
62 | .
63 |
64 |
65 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/GoalieHockeyStepLeft.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg1;: &0; . 0 -90;
38 | &rleg1;: &0; . 3.14 -90;
39 |
40 | &lleg2;: &0; . 4.71 45;
41 | &rleg2;: &0; . -3.14 -45;
42 |
43 | &lleg3;: &3; . 3.14 76.5;
44 | &rleg3;: &3; . -4.71 76.5;
45 |
46 | &lleg4;: &0; . 0 -100;
47 | &rleg4;: &0; . -1.570796327 -100;
48 |
49 | &lleg5;: &0; . 3.14 -45;
50 | &rleg5;: &0; . -4.71 -45;
51 |
52 | &lleg6;: &0; . 3.14 -25;
53 | &rleg6;: &0; . -4.71 25;
54 |
55 | &larm1;: &0; . 1.57070 20;
56 | &rarm1;: &0; . 0 20;
57 |
58 | &larm2;: &4; . 0 30;
59 | &rarm2;: &4; . 3.14 -30;
60 |
61 |
62 | .
63 |
64 |
65 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroReflectTC17.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/GoalieHockeyRotateLeft.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg1;: &0; . 0 -90;
38 | &rleg1;: &0; . 3.14 -90;
39 |
40 | &lleg2;: &0; . 4.71 45;
41 | &rleg2;: &0; . -3.14 -45;
42 |
43 | &lleg3;: &3; . -4.71 76.5;
44 | &rleg3;: &3; . 3.14 76.5;
45 |
46 | &lleg4;: &0; . 0 -100;
47 | &rleg4;: &0; . -1.570796327 -100;
48 |
49 | &lleg5;: &0; . 3.14 -45;
50 | &rleg5;: &0; . -4.71 -45;
51 |
52 | &lleg6;: &0; . 3.14 -25;
53 | &rleg6;: &0; . -4.71 25;
54 |
55 | &larm1;: &0; . 1.57070 20;
56 | &rarm1;: &0; . 0 20;
57 |
58 | &larm2;: &4; . 3.14 30;
59 | &rarm2;: &4; . 0 -30;
60 |
61 |
62 | .
63 |
64 |
65 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/GoalieHockeyRotateRight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg1;: &0; . 0 -90;
38 | &rleg1;: &0; . 3.14 -90;
39 |
40 | &lleg2;: &0; . 4.71 45;
41 | &rleg2;: &0; . -3.14 -45;
42 |
43 | &lleg3;: &3; . 3.14 76.5;
44 | &rleg3;: &3; . -4.71 76.5;
45 |
46 | &lleg4;: &0; . 0 -100;
47 | &rleg4;: &0; . -1.570796327 -100;
48 |
49 | &lleg5;: &0; . 3.14 -45;
50 | &rleg5;: &0; . -4.71 -45;
51 |
52 | &lleg6;: &0; . 3.14 -25;
53 | &rleg6;: &0; . -4.71 25;
54 |
55 | &larm1;: &0; . 1.57070 20;
56 | &rarm1;: &0; . 0 20;
57 |
58 | &larm2;: &4; . 3.14 30;
59 | &rarm2;: &4; . 0 -30;
60 |
61 |
62 | .
63 |
64 |
65 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/TurnLeft.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 30;
41 | &rleg3;: &1; . 0 30;
42 |
43 | &lleg4;: &2; . 0 -50;
44 | &rleg4;: -&2; . 0 -50;
45 |
46 | &lleg5;: -&1; . 0 20;
47 | &rleg5;: &1; . 0 20;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 -10;
53 | &rleg1;: -&4; . 1.570796327 -10;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/TurnRight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: &1; . 0 30;
41 | &rleg3;: -&1; . 0 30;
42 |
43 | &lleg4;: -&2; . 0 -50;
44 | &rleg4;: &2; . 0 -50;
45 |
46 | &lleg5;: &1; . 0 20;
47 | &rleg5;: -&1; . 0 20;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: -&4; . 1.570796327 -10;
53 | &rleg1;: -&4; . 1.570796327 -10;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_openai/make_env.py:
--------------------------------------------------------------------------------
1 | """
2 | Code for creating a multiagent environment with one of the scenarios listed
3 | in ./scenarios/.
4 | Can be called by using, for example:
5 | env = make_env('simple_speaker_listener')
6 | After producing the env object, can be used similarly to an OpenAI gym
7 | environment.
8 |
9 | A policy using this environment must output actions in the form of a list
10 | for all agents. Each element of the list should be a numpy array,
11 | of size (env.world.dim_p + env.world.dim_c, 1). Physical actions precede
12 | communication actions in this array. See environment.py for more details.
13 | """
14 |
15 | def make_env(scenario_name, benchmark=False):
16 | '''
17 | Creates a MultiAgentEnv object as env. This can be used similar to a gym
18 | environment by calling env.reset() and env.step().
19 | Use env.render() to view the environment on the screen.
20 |
21 | Input:
22 | scenario_name : name of the scenario from ./scenarios/ to be Returns
23 | (without the .py extension)
24 | benchmark : whether you want to produce benchmarking data
25 | (usually only done during evaluation)
26 |
27 | Some useful env properties (see environment.py):
28 | .observation_space : Returns the observation space for each agent
29 | .action_space : Returns the action space for each agent
30 | .n : Returns the number of Agents
31 | '''
32 | from simulator_openai.environment import MultiAgentEnv
33 | import simulator_openai.scenarios as scenarios
34 |
35 | # load scenario from script
36 | scenario = scenarios.load(scenario_name + ".py").Scenario()
37 | # create world
38 | world = scenario.make_world()
39 | # create multiagent environment
40 | if benchmark:
41 | env = MultiAgentEnv(world, scenario.reset_world, scenario.reward, scenario.observation, scenario.benchmark_data)
42 | else:
43 | env = MultiAgentEnv(world, scenario.reset_world, scenario.reward, scenario.observation)
44 | return env
45 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/RotatePrepare.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroKick2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroZMPWalk.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroWalkSide.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroZMPWalkFast.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/BlindGroupUpCommsBatch.sh:
--------------------------------------------------------------------------------
1 | export PYTHONPATH=$(pwd)
2 |
3 | #for trial in 0
4 | #do
5 | # for comm in 20
6 | # do
7 | # for ac in 1
8 | # do
9 | # python3 BlindGroupUp/A3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac" --comm_delivery_failure_chance=0.5
10 | # sleep 5
11 | # mkdir BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"
12 | # mv model train_* BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"/
13 | # done
14 | # done
15 | #done
16 |
17 | #for trial in 1
18 | #do
19 | # for comm in 20
20 | # do
21 | # for ac in 1
22 | # do
23 | # python3 BlindGroupUp/A3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac" --comm_gaussian_noise=0.5
24 | # sleep 5
25 | # mkdir BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"
26 | # mv model train_* BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"/
27 | # done
28 | # done
29 | #done
30 |
31 | #for trial in 2
32 | #do
33 | # for comm in 20
34 | # do
35 | # for ac in 1
36 | # do
37 | # python3 BlindGroupUp/A3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac" --comm_jumble_chance=0.5
38 | # sleep 5
39 | # mkdir BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"
40 | # mv model train_* BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"/
41 | # done
42 | # done
43 | #done
44 |
45 | for trial in 3
46 | do
47 | for comm in 20
48 | do
49 | for ac in 1
50 | do
51 | python3 BlindGroupUp/A3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac" --comm_delivery_failure_chance=0.5 --comm_gaussian_noise=0.5 --comm_jumble_chance=0.5
52 | sleep 5
53 | mkdir BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"
54 | mv model train_* BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"/
55 | done
56 | done
57 | done
58 |
59 | exit
60 |
61 | for trial in 4
62 | do
63 | for comm in 20
64 | do
65 | for ac in 1
66 | do
67 | python3 BlindGroupUp/A3C-LocalThreads.py --num_slaves=3 --comm_size="$comm" --critic="$ac"
68 | sleep 5
69 | mkdir BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"
70 | mv model train_* BlindGroupUp-"$comm"Comm-AC"$ac"-Trial"$trial"/
71 | done
72 | done
73 | done
74 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/FallToSide.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/SideRightS.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 28.44;
41 | &rleg3;: &1; . 0 28.44;
42 |
43 | &lleg4;: &2; . 0 -46.33;
44 | &rleg4;: -&2; . 0 -46.33;
45 |
46 | &lleg5;: -&1; . 0 31;
47 | &rleg5;: &1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: &4; . 1.570796327 0;
53 | &rleg1;: &4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_openai/policy.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | from pyglet.window import key
3 |
4 | # individual agent policy
5 | class Policy(object):
6 | def __init__(self):
7 | pass
8 | def action(self, obs):
9 | raise NotImplementedError()
10 |
11 | # interactive policy based on keyboard input
12 | # hard-coded to deal only with movement, not communication
13 | class InteractivePolicy(Policy):
14 | def __init__(self, env, agent_index):
15 | super(InteractivePolicy, self).__init__()
16 | self.env = env
17 | # hard-coded keyboard events
18 | self.move = [False for i in range(4)]
19 | self.comm = [False for i in range(env.world.dim_c)]
20 | # register keyboard events with this environment's window
21 | env.viewers[agent_index].window.on_key_press = self.key_press
22 | env.viewers[agent_index].window.on_key_release = self.key_release
23 |
24 | def action(self, obs):
25 | # ignore observation and just act based on keyboard events
26 | if self.env.discrete_action_input:
27 | u = 0
28 | if self.move[0]: u = 1
29 | if self.move[1]: u = 2
30 | if self.move[2]: u = 4
31 | if self.move[3]: u = 3
32 | else:
33 | u = np.zeros(5) # 5-d because of no-move action
34 | if self.move[0]: u[1] += 1.0
35 | if self.move[1]: u[2] += 1.0
36 | if self.move[3]: u[3] += 1.0
37 | if self.move[2]: u[4] += 1.0
38 | if True not in self.move:
39 | u[0] += 1.0
40 | return np.concatenate([u, np.zeros(self.env.world.dim_c)])
41 |
42 | # keyboard event callbacks
43 | def key_press(self, k, mod):
44 | if k==key.LEFT: self.move[0] = True
45 | if k==key.RIGHT: self.move[1] = True
46 | if k==key.UP: self.move[2] = True
47 | if k==key.DOWN: self.move[3] = True
48 | def key_release(self, k, mod):
49 | if k==key.LEFT: self.move[0] = False
50 | if k==key.RIGHT: self.move[1] = False
51 | if k==key.UP: self.move[2] = False
52 | if k==key.DOWN: self.move[3] = False
53 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/SideRight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 28.44;
41 | &rleg3;: &1; . 0 28.44;
42 |
43 | &lleg4;: &2; . 0 -46.33;
44 | &rleg4;: -&2; . 0 -46.33;
45 |
46 | &lleg5;: -&1; . 0 31;
47 | &rleg5;: &1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: &4; . 1.570796327 0;
53 | &rleg1;: &4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/RotateLeftGoalieFastLRei.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | ]>
32 |
33 |
34 |
35 |
36 | &lleg2;: -&3; 0 0.5 0;
37 | &rleg2;: &3; 0 0.5 0;
38 |
39 | &lleg3;: &1; . 0 20;
40 | &rleg3;: -&1; . 0 20;
41 |
42 | &lleg4;: -&2; . 0 -50;
43 | &rleg4;: &2; . 0 -50;
44 |
45 | &lleg5;: &1; . 0 28;
46 | &rleg5;: -&1; . 0 28;
47 |
48 | &lleg6;: &3; . 1.570796327 0;
49 | &rleg6;: -&3; . 1.570796327 0;
50 |
51 | &lleg1;: &4; . 1.570796327 -10;
52 | &rleg1;: &4; . 1.570796327 -10;
53 |
54 | &larm1;: 0 . 0 -90;
55 | &rarm1;: 0 . 0 -90;
56 |
57 |
58 | .
59 |
60 |
61 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroTurnPosition.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroWalkPosition.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/zero/ZeroWalkFastPosition.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/oldSideLeft.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: &1; . 0 16;
41 | &rleg3;: -&1; . 0 16;
42 |
43 | &lleg4;: -&2; . 0 -29;
44 | &rleg4;: &2; . 0 -29;
45 |
46 | &lleg5;: &1; . 0 25;
47 | &rleg5;: -&1; . 0 25;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 |
56 |
57 | &larm1;: 0 . 0 -90;
58 | &rarm1;: 0 . 0 -90;
59 |
60 |
61 | .
62 |
63 |
64 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/BackWalk.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ]>
31 |
32 |
33 |
34 | &larm1;: 30 . 1.570796327 -90;
35 | &rarm1;: -30 . 1.570796327 -90;
36 |
37 | &lleg1;: &3; . 1.570796327 0;
38 | &rleg1;: &3; . 1.570796327 0;
39 |
40 | &lleg2;: -&3; . 1.570796327 0;
41 | &rleg2;: &3; . 1.570796327 0;
42 |
43 | &lleg3;: &1; . 0 28.44, &1; . 1.570796327 0;
44 | &rleg3;: -&1; . 0 28.44, -&1; . 1.570796327 0;
45 |
46 | &lleg4;: -&2; . 0 -46.33;
47 | &rleg4;: &2; . 0 -46.33;
48 |
49 | &lleg5;: &1; . 0 31.0, -&1; . 1.570796327 0;
50 | &rleg5;: -&1; . 0 31.0, &1; . 1.570796327 0;
51 |
52 | &lleg6;: &3; . 1.570796327 0;
53 | &rleg6;: -&3; . 1.570796327 0;
54 |
55 |
56 | .
57 |
58 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/BackWalkS.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ]>
31 |
32 |
33 |
34 | &larm1;: 20 . 1.570796327 -90;
35 | &rarm1;: -20 . 1.570796327 -90;
36 |
37 | &lleg1;: &3; . 1.570796327 0;
38 | &rleg1;: &3; . 1.570796327 0;
39 |
40 | &lleg2;: -&3; . 1.570796327 0;
41 | &rleg2;: &3; . 1.570796327 0;
42 |
43 | &lleg3;: &1; . 0 28.44, &1; . 1.570796327 0;
44 | &rleg3;: -&1; . 0 28.44, -&1; . 1.570796327 0;
45 |
46 | &lleg4;: -&2; . 0 -46.33;
47 | &rleg4;: &2; . 0 -46.33;
48 |
49 | &lleg5;: &1; . 0 31.0, -&1; . 1.570796327 0;
50 | &rleg5;: -&1; . 0 31.0, &1; . 1.570796327 0;
51 |
52 | &lleg6;: &3; . 1.570796327 0;
53 | &rleg6;: -&3; . 1.570796327 0;
54 |
55 |
56 | .
57 |
58 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/BackWalkF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ]>
31 |
32 |
33 |
34 | &larm1;: 50 . 1.570796327 -90;
35 | &rarm1;: -50 . 1.570796327 -90;
36 |
37 | &lleg1;: &3; . 1.570796327 0;
38 | &rleg1;: &3; . 1.570796327 0;
39 |
40 | &lleg2;: -&3; . 1.570796327 0;
41 | &rleg2;: &3; . 1.570796327 0;
42 |
43 | &lleg3;: &1; . 0 28.44, &1; . 1.570796327 0;
44 | &rleg3;: -&1; . 0 28.44, -&1; . 1.570796327 0;
45 |
46 | &lleg4;: -&2; . 0 -46.33;
47 | &rleg4;: &2; . 0 -46.33;
48 |
49 | &lleg5;: &1; . 0 31.0, -&1; . 1.570796327 0;
50 | &rleg5;: -&1; . 0 31.0, &1; . 1.570796327 0;
51 |
52 | &lleg6;: &3; . 1.570796327 0;
53 | &rleg6;: -&3; . 1.570796327 0;
54 |
55 |
56 | .
57 |
58 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/BackWalkVF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ]>
31 |
32 |
33 |
34 | &larm1;: 50 . 1.570796327 -90;
35 | &rarm1;: -50 . 1.570796327 -90;
36 |
37 | &lleg1;: &3; . 1.570796327 0;
38 | &rleg1;: &3; . 1.570796327 0;
39 |
40 | &lleg2;: -&3; . 1.570796327 0;
41 | &rleg2;: &3; . 1.570796327 0;
42 |
43 | &lleg3;: &1; . 0 28.44, &1; . 1.570796327 0;
44 | &rleg3;: -&1; . 0 28.44, -&1; . 1.570796327 0;
45 |
46 | &lleg4;: -&2; . 0 -46.33;
47 | &rleg4;: &2; . 0 -46.33;
48 |
49 | &lleg5;: &1; . 0 31.0, -&1; . 1.570796327 0;
50 | &rleg5;: -&1; . 0 31.0, &1; . 1.570796327 0;
51 |
52 | &lleg6;: &3; . 1.570796327 0;
53 | &rleg6;: -&3; . 1.570796327 0;
54 |
55 |
56 | .
57 |
58 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/FrontWalkF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ]>
31 |
32 |
33 |
34 | &larm1;: -50 . 1.570796327 -90;
35 | &rarm1;: 50 . 1.570796327 -90;
36 |
37 | &lleg1;: &3; . 1.570796327 0;
38 | &rleg1;: &3; . 1.570796327 0;
39 |
40 | &lleg2;: -&3; . 1.570796327 0;
41 | &rleg2;: &3; . 1.570796327 0;
42 |
43 | &lleg3;: -&1; . 0 28.44, &1; . 1.570796327 0;
44 | &rleg3;: &1; . 0 28.44, -&1; . 1.570796327 0;
45 |
46 | &lleg4;: &2; . 0 -46.33;
47 | &rleg4;: -&2; . 0 -46.33;
48 |
49 | &lleg5;: -&1; . 0 31.0, -&1; . 1.570796327 0;
50 | &rleg5;: &1; . 0 31.0, &1; . 1.570796327 0;
51 |
52 | &lleg6;: &3; . 1.570796327 0;
53 | &rleg6;: -&3; . 1.570796327 0;
54 |
55 |
56 | .
57 |
58 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/SideLeftF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: &1; . 0 28.44;
41 | &rleg3;: -&1; . 0 28.44;
42 |
43 | &lleg4;: -&2; . 0 -46.33;
44 | &rleg4;: &2; . 0 -46.33;
45 |
46 | &lleg5;: &1; . 0 31;
47 | &rleg5;: -&1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: &4; . 1.570796327 0;
53 | &rleg1;: &4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/SideLeftS.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: &1; . 0 28.44;
41 | &rleg3;: -&1; . 0 28.44;
42 |
43 | &lleg4;: -&2; . 0 -46.33;
44 | &rleg4;: &2; . 0 -46.33;
45 |
46 | &lleg5;: &1; . 0 31.0;
47 | &rleg5;: -&1; . 0 31.0;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: &4; . 1.570796327 0;
53 | &rleg1;: &4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/SideRightF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 28.44;
41 | &rleg3;: &1; . 0 28.44;
42 |
43 | &lleg4;: &2; . 0 -46.33;
44 | &rleg4;: -&2; . 0 -46.33;
45 |
46 | &lleg5;: -&1; . 0 30;
47 | &rleg5;: &1; . 0 30;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 | &lleg1;: &4; . 1.570796327 0;
53 | &rleg1;: &4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -90;
56 | &rarm1;: 0 . 0 -90;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/FrontWalkVF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ]>
31 |
32 |
33 |
34 | &larm1;: -50 . 1.570796327 -90;
35 | &rarm1;: 50 . 1.570796327 -90;
36 |
37 | &lleg1;: &3; . 1.570796327 0;
38 | &rleg1;: &3; . 1.570796327 0;
39 |
40 | &lleg2;: -&3; . 1.570796327 0;
41 | &rleg2;: &3; . 1.570796327 0;
42 |
43 | &lleg3;: -&1; . 0 28.44, &1; . 1.570796327 0;
44 | &rleg3;: &1; . 0 28.44, -&1; . 1.570796327 0;
45 |
46 | &lleg4;: &2; . 0 -46.33;
47 | &rleg4;: -&2; . 0 -46.33;
48 |
49 | &lleg5;: -&1; . 0 31.0, -&1; . 1.570796327 0;
50 | &rleg5;: &1; . 0 31.0, &1; . 1.570796327 0;
51 |
52 | &lleg6;: &3; . 1.570796327 0;
53 | &rleg6;: -&3; . 1.570796327 0;
54 |
55 |
56 | .
57 |
58 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/RotateRightGoalie.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: &1; . 0 28.44;
41 | &rleg3;: -&1; . 0 28.44;
42 |
43 | &lleg4;: -&2; . 0 -46.33;
44 | &rleg4;: &2; . 0 -46.33;
45 |
46 | &lleg5;: &1; . 0 31;
47 | &rleg5;: -&1; . 0 31;
48 |
49 | &lleg6;: &3; . 1.570796327 -10;
50 | &rleg6;: -&3; . 1.570796327 -10;
51 |
52 | &lleg1;: -&4; . 1.570796327 0;
53 | &rleg1;: -&4; . 1.570796327 0;
54 |
55 | &larm1;: 0 . 0 -110;
56 | &rarm1;: 0 . 0 -110;
57 |
58 |
59 | .
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/oldSideRight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 | &lleg2;: -&3; . 1.570796327 0;
38 | &rleg2;: &3; . 1.570796327 0;
39 |
40 | &lleg3;: -&1; . 0 16;
41 | &rleg3;: &1; . 0 16;
42 |
43 | &lleg4;: &2; . 0 -29;
44 | &rleg4;: -&2; . 0 -29;
45 |
46 | &lleg5;: -&1; . 0 25;
47 | &rleg5;: &1; . 0 25;
48 |
49 | &lleg6;: &3; . 1.570796327 0;
50 | &rleg6;: -&3; . 1.570796327 0;
51 |
52 |
56 |
57 | &larm1;: 0 . 0 -90;
58 | &rarm1;: 0 . 0 -90;
59 |
60 |
61 | .
62 |
63 |
64 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/SideLeft.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | ]>
34 |
35 |
36 |
37 |
38 | &lleg2;: -&3; . &phase; 0;
39 | &rleg2;: &3; . &phase; 0;
40 |
41 | &lleg3;: &1; . 0 28.44;
42 | &rleg3;: -&1; . 0 28.44;
43 |
44 | &lleg4;: -&2; . 0 -46.33;
45 | &rleg4;: &2; . 0 -46.33;
46 |
47 | &lleg5;: &1; . 0 31;
48 | &rleg5;: -&1; . 0 31;
49 |
50 | &lleg6;: &3; . &phase; 0;
51 | &rleg6;: -&3; . &phase; 0;
52 |
53 | &lleg1;: &4; . &phase; 0;
54 | &rleg1;: &4; . &phase; 0;
55 |
56 | &larm1;: 0 . 0 -90;
57 | &rarm1;: 0 . 0 -90;
58 |
59 |
60 | .
61 |
62 |
63 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/FallBack.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/getup/FallFront.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/getup/FallBack.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotateLeftF.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | ]>
33 |
34 |
35 |
36 |
37 |
38 |
39 | &lleg2;: -&3; . 1.570796327 0;
40 | &rleg2;: &3; . 1.570796327 0;
41 |
42 | &lleg3;: &1; . 0 28.44;
43 | &rleg3;: -&1; . 0 28.44;
44 |
45 | &lleg4;: -&2; . 0 -46.33;
46 | &rleg4;: &2; . 0 -46.33;
47 |
48 | &lleg5;: &1; . 0 31;
49 | &rleg5;: -&1; . 0 31;
50 |
51 | &lleg6;: &3; . 1.570796327 0;
52 | &rleg6;: -&3; . 1.570796327 0;
53 |
54 | &lleg1;: -&4; . 1.570796327 -10;
55 | &rleg1;: -&4; . 1.570796327 -10;
56 |
57 | &larm1;: 0 . 0 -90;
58 | &rarm1;: 0 . 0 -90;
59 |
60 |
61 | .
62 |
63 |
64 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/goalie/FallFront.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | ]>
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/test/RotateLeftGoalie.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | ]>
34 |
35 |
36 |
37 |
38 | &lleg2;: -&3; . 1.570796327 0;
39 | &rleg2;: &3; . 1.570796327 0;
40 |
41 | &lleg3;: &1; . 0 28.44;
42 | &rleg3;: -&1; . 0 28.44;
43 |
44 | &lleg4;: -&2; . 0 -46.33;
45 | &rleg4;: &2; . 0 -46.33;
46 |
47 | &lleg5;: &1; . 0 31;
48 | &rleg5;: -&1; . 0 31;
49 |
50 | &lleg6;: &3; . 1.570796327 0;
51 | &rleg6;: -&3; . 1.570796327 0;
52 |
53 | &lleg1;: &4; . 1.570796327 -10;
54 | &rleg1;: &4; . 1.570796327 -10;
55 |
56 | &larm1;: 0 . 0 -90;
57 | &rarm1;: 0 . 0 -90;
58 |
59 |
60 | .
61 |
62 |
63 |
--------------------------------------------------------------------------------
/simulator_openai/scenarios/simple.py:
--------------------------------------------------------------------------------
1 | import numpy as np
2 | from simulator_openai.core import World, Agent, Landmark
3 | from simulator_openai.scenario import BaseScenario
4 |
5 | class Scenario(BaseScenario):
6 | def make_world(self):
7 | world = World()
8 | # add agents
9 | world.agents = [Agent() for i in range(1)]
10 | for i, agent in enumerate(world.agents):
11 | agent.name = 'agent %d' % i
12 | agent.collide = False
13 | agent.silent = True
14 | # add landmarks
15 | world.landmarks = [Landmark() for i in range(1)]
16 | for i, landmark in enumerate(world.landmarks):
17 | landmark.name = 'landmark %d' % i
18 | landmark.collide = False
19 | landmark.movable = False
20 | # make initial conditions
21 | self.reset_world(world)
22 | return world
23 |
24 | def reset_world(self, world):
25 | # random properties for agents
26 | for i, agent in enumerate(world.agents):
27 | agent.color = np.array([0.25,0.25,0.25])
28 | # random properties for landmarks
29 | for i, landmark in enumerate(world.landmarks):
30 | landmark.color = np.array([0.75,0.75,0.75])
31 | world.landmarks[0].color = np.array([0.75,0.25,0.25])
32 | # set random initial states
33 | for agent in world.agents:
34 | agent.state.p_pos = np.random.uniform(-1,+1, world.dim_p)
35 | agent.state.p_vel = np.zeros(world.dim_p)
36 | agent.state.c = np.zeros(world.dim_c)
37 | for i, landmark in enumerate(world.landmarks):
38 | landmark.state.p_pos = np.random.uniform(-1,+1, world.dim_p)
39 | landmark.state.p_vel = np.zeros(world.dim_p)
40 |
41 | def reward(self, agent, world):
42 | dist2 = np.sum(np.square(agent.state.p_pos - world.landmarks[0].state.p_pos))
43 | return -dist2
44 |
45 | def observation(self, agent, world):
46 | # get positions of all entities in this agent's reference frame
47 | entity_pos = []
48 | for entity in world.landmarks:
49 | entity_pos.append(entity.state.p_pos - agent.state.p_pos)
50 | return np.concatenate([agent.state.p_vel] + entity_pos)
51 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/FrontWalk.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ]>
31 |
32 |
33 |
34 | &larm1;: -20 . 1.570796327 -90;
35 | &rarm1;: 20 . 1.570796327 -90;
36 |
37 | &larm2;: 0 . 1.570796327 0;
38 | &rarm2;: 0 . 1.570796327 -0;
39 |
40 | &lleg1;: &3; . 1.570796327 0;
41 | &rleg1;: &3; . 1.570796327 0;
42 |
43 | &lleg2;: -&3; . 1.570796327 0;
44 | &rleg2;: &3; . 1.570796327 0;
45 |
46 | &lleg3;: -&1; . 0 28.44, &1; . 1.570796327 0;
47 | &rleg3;: &1; . 0 28.44, -&1; . 1.570796327 0;
48 |
49 | &lleg4;: &2; . 0 -46.33;
50 | &rleg4;: -&2; . 0 -46.33;
51 |
52 | &lleg5;: -&1; . 0 31.0, -&1; . 1.570796327 0;
53 | &rleg5;: &1; . 0 31.0, &1; . 1.570796327 0;
54 |
55 | &lleg6;: &3; . 1.570796327 0;
56 | &rleg6;: -&3; . 1.570796327 0;
57 |
58 |
59 | .
60 |
61 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/FrontWalkS.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | ]>
31 |
32 |
33 |
34 | &larm1;: -20 . 1.570796327 -90;
35 | &rarm1;: 20 . 1.570796327 -90;
36 |
37 | &larm2;: 0 . 1.570796327 0;
38 | &rarm2;: 0 . 1.570796327 -0;
39 |
40 | &lleg1;: &3; . 1.570796327 0;
41 | &rleg1;: &3; . 1.570796327 0;
42 |
43 | &lleg2;: -&3; . 1.570796327 0;
44 | &rleg2;: &3; . 1.570796327 0;
45 |
46 | &lleg3;: -&1; . 0 28.44, &1; . 1.570796327 0;
47 | &rleg3;: &1; . 0 28.44, -&1; . 1.570796327 0;
48 |
49 | &lleg4;: &2; . 0 -46.33;
50 | &rleg4;: -&2; . 0 -46.33;
51 |
52 | &lleg5;: -&1; . 0 31.0, -&1; . 1.570796327 0;
53 | &rleg5;: &1; . 0 31.0, &1; . 1.570796327 0;
54 |
55 | &lleg6;: &3; . 1.570796327 0;
56 | &rleg6;: -&3; . 1.570796327 0;
57 |
58 |
59 | .
60 |
61 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotateRight.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | ]>
35 |
36 |
37 |
38 |
39 |
40 |
41 | &lleg2;: -&3; . &p2; 0;
42 | &rleg2;: &3; . &p2; 0;
43 |
44 | &lleg3;: &1; . &p1; 28.44;
45 | &rleg3;: -&1; . &p1; 28.44;
46 |
47 | &lleg4;: -&2; . &p1; -46.33;
48 | &rleg4;: &2; . &p1; -46.33;
49 |
50 | &lleg5;: &1; . &p1; 31;
51 | &rleg5;: -&1; . &p1; 31;
52 |
53 | &lleg6;: &3; . &p2; 0;
54 | &rleg6;: -&3; . &p2; 0;
55 |
56 | &lleg1;: -&4; . &p2; -10;
57 | &rleg1;: -&4; . &p2; -10;
58 |
59 | &larm1;: 0 . &p1; -90;
60 | &rarm1;: 0 . &p1; -90;
61 |
62 |
63 | .
64 |
65 |
66 |
--------------------------------------------------------------------------------
/simulator_fcp/fcp/movs/prepkick/RotateRightS.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 | ]>
35 |
36 |
37 |
38 |
39 |
40 |
41 | &lleg2;: -&3; . &p2; 0;
42 | &rleg2;: &3; . &p2; 0;
43 |
44 | &lleg3;: &1; . &p1; 28.44;
45 | &rleg3;: -&1; . &p1; 28.44;
46 |
47 | &lleg4;: -&2; . &p1; -46.33;
48 | &rleg4;: &2; . &p1; -46.33;
49 |
50 | &lleg5;: &1; . &p1; 31;
51 | &rleg5;: -&1; . &p1; 31;
52 |
53 | &lleg6;: &3; . &p2; 0;
54 | &rleg6;: -&3; . &p2; 0;
55 |
56 | &lleg1;: -&4; . &p2; -10;
57 | &rleg1;: -&4; . &p2; -10;
58 |
59 | &larm1;: 0 . &p1; -90;
60 | &rarm1;: 0 . &p1; -90;
61 |
62 |
63 | .
64 |
65 |
66 |
--------------------------------------------------------------------------------