Skip to content

citrus610/ama

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ama


Strongest Puyo Puyo Tsu AI

ko-fi

Overview

Ama is an AI created to play Puyo Puyo Tsu 1P and PVP. This project aims to become the strongest Puyo Puyo entity. Currently, Ama can run on Puyo Puyo Champions Steam version.

Features

  • Field representation
    • Bitfield
    • SIMD for fast chain simulation
  • Search
    • Best first search
    • Beam search
      • Parallelized search
      • Monte Carlo inspired sampling method with predetermined queues
      • Highest expected chain score selection policy
    • Quiescence search
    • Transposition table
      • Value-preferred with aging replacement scheme
  • Evaluation
    • Pattern matching
      • GTR
      • Sullen GTR
      • Fron
    • Chain detection
    • Chain extension
    • Trigger height
    • Field shape
    • Avoid tearing
    • Avoid wasting resources
  • Enemy reading
    • State machine
    • Build action
      • Big chain (78% of chains >= 100,000)
      • Fast second chain
      • All Clear battle
      • Imbalance resources
      • Countering
      • Harassment
    • Attack action
      • Negamax inspired search that can look 3 moves ahead
      • Crush
      • Combo
      • Kill
    • Defense action
      • Negamax inspired search that can look 2 moves ahead
      • Correspondence return
      • Synchronized attack
      • Accepting/Countering
      • Desparate return

How to build

For now, this projects can only be compiled using g++ that supports c++ 20. Make sure that your cpu support sse4 and pext.

  • Clone and cd to the repository.
  • Run make PEXT=true puyop to build the puyop client.
  • Get the binary in bin.

NOTE: The source code for the Puyo Puyo Champions Steam isn't available to prevent cheating

Acknowledgement

  • Thanks K. Ikeda, D. Tomizawa, S. Viennot and Y. Tanaka for their paper Playing PuyoPuyo: Two search algorithms for constructing chain and tactical heuristics. Ama's early search algorithm was heavily influenced by their work.
  • Thanks puyoai for the fast implementation of bitfield and the inspiration for the evaluation function.
  • Thanks takapt for their beam search idea, Ama's new improved beam search was based on their implemntation.
  • Thanks nlohmann for the c++ json library.
  • Thanks nicoshev for their rapidhash hash function.

License

This project is licensed under MIT LICENSE.

About

Puyo Puyo Tsu AI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages