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.

This python module allows to extract data from the RAW-file-format produces by devices from Thermo Fisher Scientific.

fisher_py This Python module allows access to Thermo Orbitrap raw mass spectrometer files. Using this library makes it possible to automate the analys

8 Oct 14, 2022
Reference python implementation of Chia pool operations for pool operators

This repository provides a sample server written in python, which is meant to server as a basis for a Chia Pool. While this is a fully functional implementation, it requires some work in scalability

Chia Network 451 Dec 13, 2022
A simple code for processing images to local binary pattern.

This figure is gotten from this link https://link.springer.com/chapter/10.1007/978-3-030-01449-0_24 LBP-Local-Binary-Pattern A simple code for process

Happy N. Monday 3 Feb 15, 2022
An Embedded Linux Project Build and Compile Tool -- An Bitbake UI Extension

Dianshao - An Embedded Linux Project Build and Compile Tool

0 Mar 27, 2022
These are my solutions to Advent of Code problems.

Advent of Code These are my solutions to Advent of Code problems. If you want to join my leaderboard, the code is 540750-9589f56d. When I solve for sp

Sumner Evans 5 Dec 19, 2022
Search and Find Jobs in Ethiopia

✨ EthioJobs ✨ Search and Find Jobs in Ethiopia Easy start critical warning Use pycharm No vscode No sublime No Vim No nothing when you want to use

Abdimk 12 Nov 09, 2022
Contains a Jupyter Notebook for calculating remaining plants required based on field/lathhouse data.

Davis-Sunflowers-Su21 Project goals: Plants influence their reproduction and mating system in many ways. Various factors such as time of flowering, ab

1 Feb 10, 2022
Template for pre-commit hooks

Pre-commit hook template This repo is a template for a pre-commit hook. Try it out by running: pre-commit try-repo https://github.com/stefsmeets/pre-c

Stef Smeets 1 Dec 09, 2021
This is Gaurav's IP Project Completed in the year session of 2021-2022.

The Analyser by Gaurav Rayat Why this Project? Today we are continuously hearing about growth in Crime rates and the number of murders executed day by

1 Dec 30, 2021
Solcast Integration for Home Assistant

Solcast Solar Home Assistant(https://www.home-assistant.io/) Component This custom component integrates the Solcast API into Home Assistant. Modified

Greg 45 Dec 20, 2022
Izy - Python functions and classes that make python even easier than it is

izy Python functions and classes that make it even easier! You will wonder why t

5 Jul 04, 2022
A set of simple functions to upload and fetch pastes on paste.uploadgram.me

pastegram-py A set of simple functions to upload and fetch pastes on paste.uploadgram.me. API Documentation Methods upload_paste(contents: bytes, file

Uploadgram 3 Sep 13, 2022
Xbox-Flood is for flood anything

Intruduction Installation Usage Installing Python 3 Wiki Getting Started Creating a Key Intruduction Xbox-Flood is for flooding messages (invitations

kayake 4 Feb 18, 2022
A powerful and user-friendly binary analysis platform!

angr angr is a platform-agnostic binary analysis framework. It is brought to you by the Computer Security Lab at UC Santa Barbara, SEFCOM at Arizona S

6.3k Jan 02, 2023
Projeto job insights - Projeto avaliativo da Trybe do Bloco 32: Introdução à Python

Termos e acordos Ao iniciar este projeto, você concorda com as diretrizes do Código de Ética e Conduta e do Manual da Pessoa Estudante da Trybe. Boas

Lucas Muffato 1 Dec 09, 2021
Purge your likes and wall comments from VKontakte. Set yourself free from your digital footprint.

vk_liberator Regain liberty in the cruel social media world. This program assists you with purging your metadata from Russian social network VKontakte

20 Jun 11, 2021
An Android app that runs Elm in a webview. And a Python script to build the app or install it on the device.

Requirements You need to have installed: the Android SDK Elm Python git Starting a project Clone this repo and cd into it: $ git clone https://github.

Benjamin Le Forestier 11 Mar 17, 2022
In this repo i inherit the pos module and added QR code to pos receipt

odoo-pos-inherit In this repo i inherit the pos module and added QR code to pos receipt 1- Create new Odoo Module using command line $ python odoo-bin

5 Apr 09, 2022
A Python version of Canvacord

A copy of canvacord made in python! Installation Run any of these commands in terminal: Mac / Linux pip install canvacord Windows python -m pip insta

10 Mar 28, 2022
Python script which synchronizes the replica-directoty with the original-one.

directories_synchronizer Python script which synchronizes the replica-directoty with the original-one. Automatically detects all changes when script i

0 Feb 13, 2022