Coder Social home page Coder Social logo

chronoreaper / yugiohai Goto Github PK

View Code? Open in Web Editor NEW
35.0 2.0 7.0 611.93 MB

A Yugioh Ai Learning bot

License: GNU General Public License v3.0

Python 2.81% Shell 0.16% C# 74.85% Dockerfile 0.02% HTML 3.25% C 18.48% C++ 0.44%
windbot python yugioh machine-learning yugioh-tcg decks deck-builder deck-building ygopro

yugiohai's Introduction

Yugioh Ai

This is a Yugioh Ai Simulator. The final build will have Ai find the best deck as well as play optimally.

Breakdown

There are 2 Ais that need to made. A deck building Ai which is written in python. And a game Ai written in c#.

Setup

  • Use Project Ignis Edopro OR if building EdoPro, see https://github.com/edo9300/edopro/wiki/
  • You will also need to edit the EDOPro's code in order to launch LAN mode and start the game automaticly when running from the python scripts. See ChangestoEdopro.txt
  • Download sqllite expert personal to read the .cdb database files

How to run

  • Run python train_ai.py -t -r to train the ai. -t is to set the flag to train, -r is to set the flag to reset the database
  • read_game_data.py will train all the data in the database. Add the flag -s to see what it thinks which action to take
  • get_action_weights.py will run an http server which windbot uses. You must run this if you are going to manualy run the AI.
  • After building the Windbot, in the Debug/bin file, you can run a pre program AI using this command .\WindBot.exe Deck=Master Hand=2 Name=Random2 TotalGames=25 IsTraining=false IsFirst=false and run a trained AI using this command .\WindBot.exe Deck=Random1 Hand=1 Name=Random1 TotalGames=100 IsFirst=true IsTraining=false IsManual=false be sure to run the python server by using the command get_action_weights.py.

Editing the ai

  • Notable files in Windbot are Logger.cs, GameAI.cs and RandomExecutorBase.cs
  • Logger.cs controls the Weights when they are updated and read
  • GameAI controls how the ai works
  • RandomExecutorBase controls all the math and decision the AI makes.
  • In order to run the AI on EDOPro, you need to update the version number of the windbot in WindbotInfo.cs. You can get the version number from EDOPro by running a LAN game, adding a bot, and copying it's launch arguments

Using

yugiohai's People

Contributors

chronoreaper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

yugiohai's Issues

Need Working Ai to play the game

The current Ai will play and activate any card it can. Either need a learning Ai or a static script that can run and play all the cards somewhat optimally

Be able to read replays and have the Ai learn from it.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Random Crash

Random Crashing with Edopro during duel, happens after the 1st game normally.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.