The learning agent learns firstly approaching to the football and then kicking the football to the target position

Overview

Football Court

This project utilized Pytorch and Tensorflow so that the learning agent learns firstly approaching to the football and then kicking the football to the target position. Deep RL methods including DQN, A2C, and PPO are attempted in this project, and different methods has different environment requirements. The introduction of included files and methods to setup the environments with respect to different learning method are introduced as below:

1 The A2C Algorithm

Setup procedure

  1. Put all the source codes, model files, and picture files in a project folder with Python3 interpreter.
  2. Make up the environment based on 'requirement.txt'.
  3. Directly run any python file for training or testing. The purposes of the files are already indicated in their names. The adjustable parameters and booleans are listed in the beginning of the code.

The file structure

​ ./A2C/

​ A2Cmaintask_test.py : run to test the main task.

​ A2Cmaintask_train.py : run to train the main task.

​ A2Cmaintaskenv.py : environment for the main task.

​ A2Csubtask_test.py : run to test the subtask.

​ A2Csubtask_train.py : run to train the subtask.

​ A2Csubtaskenv.py : environment for the subtask.

​ 'gate.png', 'robot.png', 'soccer.png' : Three figures for the UI.

​ 'checkpoint' : format file for Tensorflow model.

​ 'maintask_trained.data-00000-of-00001',

​ 'maintask_trained.index' : Saved model for the main task.

​ 'subtask_trained.data-00000-of-00001',

​ 'subtask_trained.index' : Saved model for the subtask.

2 The PPO Algorithm

Environment build

​ For the PPO algorithm, the Deep learning framework is Pytorch. To run the program, you need to run the code below to install necessary library.

pip install stable-baselines3[extra]
pip install gym==0.19.0
pip install pyglet==1.5.21
pip install numpy==1.19.5
pip install torch==1.8.2+cu102 torchvision==0.9.2+cu102 torchaudio===0.8.2 -f https://download.pytorch.org/whl/lts/1.8/torch_lts.html
pip install -U torch-tb-profiler

Build and run file

After installing the library, run the code below to see the results of trained model.

python main_PPO_Maintask
python main_PPO_Subtask

If want to retrain the model, then open these two main.py files, change the boolean value TRAIN into True.

The file structure

./PPO/

​ env_PPO_Maintask.py : The env for the Maintask

​ env_PPO_Subtask.py : The env for the Subtask

​ main_PPO_Maintask.py : The main for the Maintask

​ main_PPO_Subtask.py : The main for the Subtask

​ requirements.txt : The requirements for the python enviroments

​ gate.png : The picture for the env render

​ robot.png : The picture for the env render

​ soccer.png : The picture for the env render

​ logs/

​ Maintask.zip : The trained model for the Maintask

​ Subtask.zip : The trained model for the Subtask

3 The DQN Algorithm

Setup procedure

  1. Put all the source codes, model files, and picture files in a project folder with Python3 interpreter.
  2. Make up the environment based on 'requirement.txt'.
  3. Directly run any python file for training or testing. The purposes of the files are already indicated in their names. The adjustable parameters and booleans are listed in the beginning of the code.

The file structure

./DQN/

​ createui.py : the UI controlling by keybroads

​ DQN_maintask_training_test.py : run to train and test the main task.

​ DQN_maintask_RL_main.py : rnetwork the main task.

​ DQN_maintask_env.py : environment for the main task.

​ DQN_subtask_training_test.py : run to train and test the subtask.

​ DQN_subtask_RL_main.py : The network the subtask.

​ DQN_subtask_env.py : environment for the subtask.

Controller state monitor plugin for EVA ICS

eva-plugin-cmon Controller status monitor plugin for EVA ICS Monitors connected controllers status in SFA and pushes measurements into an external Inf

Altertech 1 Nov 06, 2021
Awesome open-source alternatives to SaaS

Awesome-oss-alternatives - Awesome list of open-source startup alternatives to well-known SaaS products

Runa Capital 12.7k Jan 03, 2023
Reproduce digital electronics in Python

Pylectronics Reproduce digital electronics in Python Report Bug · Request Feature Table of Contents About The Project Getting Started Prerequisites In

Filipe Garcia 45 Dec 20, 2021
Small tool to use hero .json files created with Optolith for The Dark Eye/ Das Schwarze Auge 5 to perform talent probes.

DSA5-ProbeMaker A little tool for The Dark Eye 5th Edition (Das Schwarze Auge 5) to load .json from Optolith character generation and easily perform t

2 Jan 06, 2022
Automatically give thanks to Pypi packages you use in your project!

Automatically give thanks to Pypi packages you use in your project!

Ward 25 Dec 20, 2021
Tesla App Update Differences Extractor

Tesla App Update Differences Extractor Python program that finds the differences between two versions of the Tesla App. When Tesla updates the app a l

Adrian 5 Apr 11, 2022
Aevsploit İçin Destekde Bulun Papara: 1427113016

Aevsploit İçin Destekde Bulun Papara: 1427113016 Toolu Geliştirmek İçin Fikirlerinizi Bekliyorum Telegram

9 Jun 07, 2022
A play store search module

A play store search module

Fayas Noushad 5 Dec 01, 2021
Import Apex legends mprt files exported from Legion

Apex-mprt-importer-for-Blender Import Apex legends mprt files exported from Legion. REQUIRES CAST IMPORTER Usage: Use a VPK extracter to extract the m

15 Dec 18, 2022
RestMapper takes the pain out of integrating with RESTful APIs.

python-restmapper RestMapper takes the pain out of integrating with RESTful APIs. It removes all of the complexity with writing API-specific code, and

Lionheart Software 8 Oct 31, 2020
This wishes a mentioned users on their birthdays

BirthdayWisher Requirements: "mysqlserver", "email id and password", "Mysqlconnector" In-Built Modules: "smtplib", "datetime","imghdr" In Mysql: A tab

vellalaharshith 1 Sep 13, 2022
ESteg - A simple steganography program for python

ESteg A simple steganography program to embed the contents of a text file into a

Jithin Renji 1 Jan 02, 2022
Coursework project for DIP class. The goal is to use vision to guide the Dashgo robot through two traffic cones in bright color.

Coursework project for DIP class. The goal is to use vision to guide the Dashgo robot through two traffic cones in bright color.

Yueqian Liu 3 Oct 24, 2022
Gerador de dafaces

🎴 DefaceGenerator Obs: esse script foi criado com a intenção de ajudar pessoas iniciantes no hacking que ainda não conseguem criar suas próprias defa

LordShinigami 3 Jan 09, 2022
SuperCollider library for Python

SuperCollider library for Python This project is a port of core features of SuperCollider's language to Python 3. It is intended to be the same librar

Lucas Samaruga 65 Dec 22, 2022
使用京东cookie一键生成所有退会链接

JDMemberCloseLinks 本项目旨在使用京东cookie一键生成所有退会链接

hyzaw 68 Jun 10, 2022
Streamlit — The fastest way to build data apps in Python

Welcome to Streamlit 👋 The fastest way to build and share data apps. Streamlit lets you turn data scripts into sharable web apps in minutes, not week

Streamlit 22k Jan 06, 2023
Utility/Raiding selfbot made by Shell and Roover.

Utility/Raiding selfbot made by Shell and Roover. We are open to suggestions and ideas.

Shell 2 Dec 08, 2021
A simple streamlit webapp with multiple functionality

A simple streamlit webapp with multiple functionality

Omkar Pramod Hankare 2 Nov 24, 2021
An extension module to make reaction based menus with disnake

disnake-ext-menus An experimental extension menu that makes working with reaction menus a bit easier. Installing python -m pip install -U disnake-ext-

1 Nov 25, 2021