Skip to content

afif95/A3C-for-KungFuMaster-Environment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A3C for Kung Fu in OpenAI Gym

This repository contains code for training an A3C agent to play Kung Fu MasterDeterministic-v0 environment in OpenAI Gym.

Key Features:

  • Implementation of the A3C (Asynchronous Advantage Actor-Critic) algorithm for multi-agent training.

  • Preprocessing pipeline for Kung Fu observations using the PreprocessAtari wrapper.

  • Environment batching for parallel interaction with multiple environments.

  • Evaluation of the trained agent on single episodes.

  • Video recording and visualization of the agent's gameplay.

  • Train the agent for 3000 episodes and periodically show the average agent reward during training.

    Environment: https://gymnasium.farama.org/environments/atari/kung_fu_master/

a

video.mp4

Requirements:

Python 3 PyTorch NumPy OpenAI Gym tqdm

Additional Notes:

The script currently trains 10 agents in 10 parallel environments. You can modify these numbers in the number_environments and EnvBatch class. The reward scaling (batch_rewards *= 0.01) is optional and might need adjustment depending on your environment and training dynamics.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published