Skip to content

Pokémon AI created for CS 4710 (Artificial Intelligence) @ UVA.

Notifications You must be signed in to change notification settings

alex-shen1/Youngster-Joey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup Instructions

  • Install Node.js on your computer (I used v16.13.0 to set up this repo)
  • Enter npm install into terminal - this will install the necessary dependencies (i.e. the Pokémon Showdown Node package)
  • Run the program by running node bot.js in terminal (currently doesn't do anything)
  • Need to also now run npm install @smogon/calc (if this doesn't work, delete package.json / package.lock and just re-run npm install)

Technical Investigations

  • Interface with the battle simulator by using the stream object created upon initialization
    • stream.write() to input commands
    • stream.read().then(r => {STUFF}) to get one line of output from the stream
  • 3 commands always necessary to start any battle:
    • >start {"formatid": "{FORMAT}"} - initializes battle format
    • >player p1 {"name": "{NAME}"} - initializes player 1
    • >player p2 {"name": "{NAME}"} - initializes player 2
    • Can add TEAM field to player JSON if not a random battle; doing this for testing purposes
  • After that, input >p1 {ACTION} and >p2 {ACTION} e.g. >p1 move 1, p2 move 1
  • Stream will output sideupdates for both sides and an update of the overall game state, then wait for next input of actions
  • We can use the Dex library to query moves + Pokémon types. A naive heuristic we could use is to simply pick the move/action that maximizes damage, which we can do relatively easily.
    • I haven't found a way for Dex to natively give us specific type effectiveness on a given Pokémon, but that should be relatively easy to hardcode into a dictionary or something.

About

Pokémon AI created for CS 4710 (Artificial Intelligence) @ UVA.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •