Skip to content

Learning python for interest, hoping I can add a AI engine in the future.

Notifications You must be signed in to change notification settings

GodLightdesu/rainet-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rai-Net Access Battlers

Used for studying and developed based on pygame

Description

Learning python for interest, hope I can add a AI engine in the future

AI

  • RandomMove
  • Recursion

File structure

├── assets
│   ├── font
│   ├── images
│   └── screenshots
├── modules
│   ├── AI
│   │   ├── BattleArray.py
│   │   ├── randomAI.py
│   │   ├── recursion.py
│   │   └── 阵型筛选器.xlsx
│   ├── board.py
│   ├── clicker.py
│   ├── const.py
│   ├── game.py
│   ├── main.py
│   ├── move.py
│   ├── piece.py
│   ├── player.py
│   ├── skill.py
│   ├── square.py
│   └── utils.py
├── Rai-Net.py

Game images stored at folder /assets/images/;

libraries stored at folder /modules/;

Getting Started

Dependencies

pygame

numpy -> not must

Executing program

start by simpely running Rai-Net.py

# run game
if __name__ == '__main__':
  # use random piece init from database
  yellowInit = battleArraies[random.randint(0, len(battleArraies)-1)]
  blueInit = battleArraies[random.randint(0, len(battleArraies)-1)]
  
  # verse AI that search the future steps
  Yellow = Player('yellow', yellowInit, name='Okabe')
  Blue = Recursion('blue', blueInit, name='Daru', depth=4)
  
  # random choose a piece move to Exit
  # Yellow = RamdomMove('yellow', yellowInit, name='Okabe', mode='Random', virusProb=0.4)
  # Blue = RamdomMove('blue', blueInit, name='Daruu', mode='Exit', virusProb=0.4)
  
  main = Main (Yellow, Blue, view='yellow', cheat=False)
  main.Gback()

Authors

^_*

Version History

  • 1.3 Add function - aniamteMove
  • 1.1 Add a random move AI - Okabe (without skills)
  • 1.0
  • 0.1 - 0.9
    • Initial Release
    • Various bug fixes and optimizations
    • See commit change

To do

  • [✓] get all possible valid moves
    • [✓] get non lb-installed pieces' valid moves
    • [✓] get lb-installed pieces' valid moves
  • [✓] add skills' function (include undo)
    • [✓] line boost
    • [✓] fire wall
    • [✓] virus check
    • [✓] 404
  • add a AI
    • [✓] random move / random choose a piece move to exit (there is some bugs, see description)
    • Daru
    • Christina
    • Faris
    • etc...

Acknowledgments

Inspiration, code snippets, images source, etc.

雷net联机对战群

Coding Spot

Creating a Chess Engine in Python

Images source

About

Learning python for interest, hoping I can add a AI engine in the future.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages