Adding map11 to the pool
Adding 1 new map to the pool (map10)
specify loaded path.
Make sure you add you current location (~/Competition_Olympics-Running) to PYTHONPATH variable.
Windows: set PYTHONPATH=%PYTHONPATH%;xxx
Linux/macOS: export PYTHONPATH=$PYTHONPATH:xxx
where xxx
is your current path (~/Competition_Olympics-Running)
Adding 1 new map to the pool (map9)
Adding numerical error threshold.
Adding 2 new maps to the pool (map7&8);
fix the penetration bugs between two arcs, avoid numerical error when colliding with points...
Adding 2 new maps to the pool (map5&6).
check details in Jidi Competition RLChina2021智能体竞赛
标签:不完全观测;连续动作空间;连续状态空间
环境简介:智能体参加奥林匹克运动会。在这个系列的竞赛中, 两个智能体参加跑步竞赛,目标是尽快到达终点。
环境规则:
- 在一个随机地图中,对战双方各控制一个有相同质量和半径的弹性小球智能体;
- 智能体可以互相碰撞,也可以碰撞墙壁,但会损失一定的速度;
- 智能体自身有能量,每步消耗的能量与施加的驱动力和位移成正比;
- 智能体能量以固定速率恢复,如果能量衰减到零,则不能加力;
- 智能体的观测为自身朝向前方25*25的矩形区域,观测值包括墙壁、终点线、对手和跑道方向辅助箭头;
- 初始时智能体位于所在地图的起跑线位置,初始朝向与跑道方向平行;
- 当有一个智能体到达终点(红线)或环境达到最大步数500步时环境结束,先冲过终点的一方获胜,若双方均未过线则平局;
- 智能体需要具有一定的泛化性以适应不同的地图,评测时会从所有地图(每次热身赛和正赛评测时可能加入新地图)中随机选择一个作为评测地图。
动作空间:连续;两维。分别代表施加力量和转向角度。
观测:每一步环境返回一个25x25的二维矩阵,详情请见*/olympics*文件夹
奖励函数: 如果没到达终点,不得分;如果到达终点,获得100分。
环境终止条件: 有一个智能体到达终点,则环境结束;或者,环境达到最大步数500步。
评测说明:该环境属于零和游戏,在金榜的积分按照ELO进行匹配算法进行计算并排名。零和游戏在匹配对手或队友时,按照瑞士轮进行匹配。 平台验证和评测时,在单核CPU上运行用户代码(暂不支持GPU),限制用户每一步返回动作的时间不超过1s,内存不超过500M。
报名方式:访问“及第”平台( www.jidiai.cn ),在“擂台”页面选择“RLChina 智能体挑战赛 - 辛丑年冬赛季”即可报名参赛。RLCN 微信公众号后台回复“智能体竞赛”,可进入竞赛讨论群。
This is a POMDP simulated environment of 2D sports games where althletes are spheres and have continuous action space (torque and steering). The observation is a 25*25 array of agent's limited view range. We introduce collision and agent's fatigue such that no torque applies when running out of energy.
This is for now a beta version and we intend to add more sports scenario, stay tuned :)
conda create -n olympics python=3.8.5
conda activate olympics
pip install -r requirements.txt
python olympics/main.py
python rl_trainer/main.py
By default parameters, the total reward of training is shown below.
You can also locally evaluate your trained model by executing:
python evaluation_local.py --my_ai rl --opponent random --episode=50 --map=all
or specifying the map number (--map=1).
You can locally test your submission. At Jidi platform, we evaluate your submission as same as run_log.py
For example,
python run_log.py --my_ai "rl" --opponent "random"
in which you are controlling agent 1 which is green.
- Random policy --> agents/random/submission.py
- RL policy --> all files in agents/rl