subwAI icon indicating copy to clipboard operation
subwAI copied to clipboard

Can I change to another game

Open monkeycc opened this issue 4 years ago • 2 comments

Thanks for sharing the source code

I tried virtuanes

GAME : Super Mario Bros

PATH_ TO_ GAME = "D:/nes/VirtuaNES.exe"

if keyboard.is_ pressed('a')

if keyboard.is_ pressed('d')

if keyboard.is_ pressed('w')

if keyboard.is_ pressed('s')

....

import mss
# Read full screen or process screen

Can you try out a tutorial with virtuanes

monkeycc avatar Nov 13 '21 02:11 monkeycc

Hey, thank you for your suggestion!

There already are successful implementations of AI (both using genetic algorithms) for playing Mario: https://youtu.be/CI3FRsSAa_U https://youtu.be/qv6UVOQ0F44

Might try my CNN approach for Mario some time in the future, but for now I like to try games that haven't been done before and I have two ideas I'd like to do before. Will comment here once I tried it though!

nikp06 avatar Nov 13 '21 14:11 nikp06

https://youtu.be/CI3FRsSAa_U https://youtu.be/qv6UVOQ0F44

This is dependent on the gym environment and cannot be separated from the environment

You need to play any game, not gym environment

It is suggested that the framework can play any game, so it can also play Android simulator games

Instead of relying on Gym

My suggestion

Your frame can play all games

# Get process
os.getpid()

# Get an image of the process
from mss import mss

# Operate mouse and keyboard
pyautogui

monkeycc avatar Nov 16 '21 01:11 monkeycc