hsahovic / poke-env

A python interface for training Reinforcement Learning bots to battle on pokemon showdown
https://poke-env.readthedocs.io/
MIT License
297 stars 103 forks source link

Adding enumerations for the target property of moves #529

Closed caymansimpson closed 7 months ago

caymansimpson commented 7 months ago

Adding enumerations for the .target() field in Move class, to make it easier to embed moves via OHE.

Changes:

  1. Created an enumeration class of Target
  2. Changed move.target to return this enumeration
  3. Added unit tests to test the enumeration
  4. Added unit tests to test target in moves

All unit tests passed in both test_move and test_enumeration

This is in response to issue #525, but only addresses the Target field because you already have encoded volatile statuses in effect.py

caymansimpson commented 7 months ago

Please reject if you think this is not well-thought through. I'm not sure how this should best jive with Issue #523, and specifically the DoubleBattle implementation here and here

codecov[bot] commented 7 months ago

Codecov Report

Merging #529 (2d4cf46) into master (f458350) will decrease coverage by 0.14%. Report is 27 commits behind head on master. The diff coverage is 89.09%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #529 +/- ## ========================================== - Coverage 83.38% 83.24% -0.14% ========================================== Files 39 40 +1 Lines 3918 3988 +70 ========================================== + Hits 3267 3320 +53 - Misses 651 668 +17 ```
hsahovic commented 7 months ago

@caymansimpson thanks!