This is the code of using DQN to play Sekiro .

Overview

Update for using DQN to play sekiro 2021.2.2(English Version)

This is the code of using DQN to play Sekiro .

I am very glad to tell that I have writen the codes of using DQN to play Sekiro . As is known to all , Supervised learning can only learn skills from the data we provide for it . However , this time by using Reinforcement Learning , we can see a more clever agent playing Sekiro .

Reinforcement Learning can update its network by itself , using the reward feedback , which means we no longer need to collect our own data sets this time . All the data sets come from the real-time interaction between DQN network and the game. By using this DQN network , you can fight any boss you want in the game . There still something you need to know :

Have fun !

Old version sekiro_tensorflow

Code link for using Supervised learning to play Sekiro : https://github.com/analoganddigital/sekiro_tensorflow

Hello everyone , this is analoganddigital . I use this code to complete an interesting porgram of using machine learning to play Sekiro . You can see the final presentation in https://www.bilibili.com/video/BV1wC4y1s7oa/ . I am a junior student in university , which means I can't spend too much time on this program . What a shame ! On the other hand , many audiences hope me share this code . Thus , I eventually put it on the GitHub . This is an interesting program , and I hope everyone can enjoy it. In addition , I really welcome you to improve this program , to make this AI more smart ! There still something you need to konw:

  • The window size I set is 96*86 , you can change it by yourselves .
  • I finally collected 300M training data , if you want better result , maybe you need to collect more data .
  • I use Alexnet to finish the training . This program is depend on Supervised learning.
  • I have no idea about using Reinforcement learning yet , so I will really appreciate it if someone can help me to overcome this difficulty.(already finished)
  • See the tutorial video for specific code usage , link : https://www.bilibili.com/video/BV1bz4y1R7kB

Reference : https://github.com/Sentdex/pygta5/blob/master/LICENSE

更新——强化学习DQN打只狼 2021.2.2(中文说明)

我非常高兴地告诉大家,我最近又开发出了用DQN强化学习打只狼的代码。 众所周知,监督学习只能学习到我们所提供的数据集的相关技能,但是利用强化学习,我们将看到一个完全不一样的只狼。

强化学习会根据reward奖励进行判断并且自己学习一种打斗方法。更重要的是,我们这次不再需要自己收集数据集了,所有更新数据均来自于DQN网络与游戏的实时交互。 利用这个DQN代码(链接见下方),你可以挑战只狼中任何一个boss,只要boss的血条位置不变即可(因为我采用的是图像抓取的方式获取只狼的血量与boss的血量进行reward判断)。 然后还有一些注意事项:

祝各位玩得愉快!

旧版本用机器学习打只狼

旧版本的利用监督学习打只狼的代码链接: https://github.com/analoganddigital/sekiro_tensorflow

各位观众大家好,我GitHub用户名是analoganddigital。我用这个程序完成了机器学习打只狼这个项目。 最终效果视频可以看b站https://www.bilibili.com/video/BV1wC4y1s7oa/ 。 我是一个大三学生,真的非常抱歉没能长时间更新这个项目,所以我把它放到了GitHub上面,之前很多观众也是私信我想要代码。 总之我还是希望大家能喜欢这个小项目吧。当然,我非常希望大家能帮忙完善这个程序,万分感激,大家共同讨论我们会获益更多,这其实就是开源的意义。现在由于代码比较基础,所以训练效果不太好。我相信大家会有更多的点子,如果能更新一点算法,我们将会看到一个更机智的AI。我很感谢大家对之前视频的支持(受宠若惊),也十分期待大家有趣的优化,就算没有优化直接用也可以。 还有一些细节我这声明一下:

  • 我截取的图像大小是96*86的,各位可以根据自身情况选择。
  • 我最终只收集了300M的数据,如果你想训练效果更好的话,可能要收集更多。
  • 我用的神经网络是Alexnet,基于监督学习完成的。
  • 由于我能力有限,我还没想好如何用强化学习优化算法,所以如果有大佬能分享一下自己的才华,那将十分感谢。(目前已经实现)
  • 具体代码使用方法请见我在b站上发布的机器学习打只狼的教程视频,链接: https://www.bilibili.com/video/BV1bz4y1R7kB

部分参考代码: https://github.com/Sentdex/pygta5/blob/master/LICENSE

You might also like...
Game Agent Framework. Helping you create AIs / Bots that learn to play any game you own!
Game Agent Framework. Helping you create AIs / Bots that learn to play any game you own!

Serpent.AI - Game Agent Framework (Python) Update: Revival (May 2020) Development work has resumed on the framework with the aim of bringing it into 2

计算机视觉中用到的注意力模块和其他即插即用模块PyTorch Implementation Collection of Attention Module and Plug&Play Module

PyTorch实现多种计算机视觉中网络设计中用到的Attention机制,还收集了一些即插即用模块。由于能力有限精力有限,可能很多模块并没有包括进来,有任何的建议或者改进,可以提交issue或者进行PR。

根据midi文件演奏“风物之诗琴”的脚本
根据midi文件演奏“风物之诗琴”的脚本 "Windsong Lyre" auto play

Genshin-lyre-auto-play 简体中文 | English 简介 根据midi文件演奏“风物之诗琴”的脚本。由Python驱动,在此承诺, ⚠️ 项目内绝不含任何能够引起安全问题的代码。 前排提示:所有键盘在动但是原神没反应的都是因为没有管理员权限,双击run.bat或者以管理员模式

Plug-n-Play Reinforcement Learning in Python with OpenAI Gym and JAX
Plug-n-Play Reinforcement Learning in Python with OpenAI Gym and JAX

coax is built on top of JAX, but it doesn't have an explicit dependence on the jax python package. The reason is that your version of jaxlib will depend on your CUDA version.

[ICML 2021] DouZero: Mastering DouDizhu with Self-Play Deep Reinforcement Learning | 斗地主AI
[ICML 2021] DouZero: Mastering DouDizhu with Self-Play Deep Reinforcement Learning | 斗地主AI

[ICML 2021] DouZero: Mastering DouDizhu with Self-Play Deep Reinforcement Learning DouZero is a reinforcement learning framework for DouDizhu (斗地主), t

Gesture-controlled Video Game. Just swing your finger and play the game without touching your PC
Gesture-controlled Video Game. Just swing your finger and play the game without touching your PC

Gesture Controlled Video Game Detailed Blog : https://www.analyticsvidhya.com/blog/2021/06/gesture-controlled-video-game/ Introduction This project is

Gradient Step Denoiser for convergent Plug-and-Play
Gradient Step Denoiser for convergent Plug-and-Play

Source code for the paper "Gradient Step Denoiser for convergent Plug-and-Play"

A Jupyter notebook to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

A Jupyter notebook to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

Deep Q-network learning to play flappybird.

AI Plays Flappy Bird I've trained a DQN that learns to play flappy bird on it's own. Try the pre-trained model First install the pip requirements and

Owner
null
A very short and easy implementation of Quantile Regression DQN

Quantile Regression DQN Quantile Regression DQN a Minimal Working Example, Distributional Reinforcement Learning with Quantile Regression (https://arx

Arsenii Senya Ashukha 80 Sep 17, 2022
A working implementation of the Categorical DQN (Distributional RL).

Categorical DQN. Implementation of the Categorical DQN as described in A distributional Perspective on Reinforcement Learning. Thanks to @tudor-berari

Florin Gogianu 98 Sep 20, 2022
Quantile Regression DQN a Minimal Working Example, Distributional Reinforcement Learning with Quantile Regression

Quantile Regression DQN Quantile Regression DQN a Minimal Working Example, Distributional Reinforcement Learning with Quantile Regression (https://arx

Arsenii Senya Ashukha 80 Sep 17, 2022
Reinforcement learning library(framework) designed for PyTorch, implements DQN, DDPG, A2C, PPO, SAC, MADDPG, A3C, APEX, IMPALA ...

Automatic, Readable, Reusable, Extendable Machin is a reinforcement library designed for pytorch. Build status Platform Status Linux Windows Supported

Iffi 348 Dec 24, 2022
Plug and play transformer you can find network structure and official complete code by clicking List

Plug-and-play Module Plug and play transformer you can find network structure and official complete code by clicking List The following is to quickly

null 8 Mar 27, 2022
Learning from Guided Play: A Scheduled Hierarchical Approach for Improving Exploration in Adversarial Imitation Learning Source Code

Learning from Guided Play: A Scheduled Hierarchical Approach for Improving Exploration in Adversarial Imitation Learning Source Code

STARS Laboratory 8 Sep 14, 2022
Minimal diffusion models - Minimal code and simple experiments to play with Denoising Diffusion Probabilistic Models (DDPMs)

Minimal code and simple experiments to play with Denoising Diffusion Probabilist

Rithesh Kumar 16 Oct 6, 2022
Static-test - A playground to play with ideas related to testing the comparability of the code

Static test playground ⚠️ The code is just an experiment. Compiles and runs on U

Igor Bogoslavskyi 4 Feb 18, 2022
Using Python to Play Cyberpunk 2077

CyberPython 2077 Using Python to Play Cyberpunk 2077 This repo will contain code from the Cyberpython 2077 video series on Youtube (youtube.

Harrison 118 Oct 18, 2022
Scripts for training an AI to play the endless runner Subway Surfers using a supervised machine learning approach by imitation and a convolutional neural network (CNN) for image classification

About subwAI subwAI - a project for training an AI to play the endless runner Subway Surfers using a supervised machine learning approach by imitation

null 82 Jan 1, 2023