Open cameronangliss opened 4 months ago
Attention: Patch coverage is 90.90909%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 85.48%. Comparing base (
f458350
) to head (6ec5ab0
). Report is 70 commits behind head on master.
@hsahovic this is ready to go whenever you're ready to take it!
Just as a note, I could be doing reset_battles
on self
and opponent
in the _battle_against
method, and that's probably the thing that makes most sense given that the function now returns the win and lose rates, but I didn't want to make a compatibility issue with the previous functionality. @hsahovic let me know if you care about compatibility with this method or not, and if not I can put reset_battles
in there. Currently it's in _battle_against_multi
.
After using this diff myself for a little while, I decided that it would be better to just to reset_battles in the battle_against method. I just put that change in.
I agree that the current way results are handled by player objects can be improved, but i don't think starting battles should erase the previous results. These two actions should be covered by different methods in the API. I'm open to a proposal for a better structure around it, but i'm not sure this is it. Let's chat on discord? Your PR seems to contain other changes - do you want to open separate PRs for them?
@hsahovic sorry, I've been MIA for a little while, but I've cleaned this PR up and it's ready for review :)
This PR is a bag of miscellaneous improvements, including:
Player
method calledbattle_against_multi
which allows you to play one Player instance against a list of Player instances without having to play everyone against everyone as is done incross_evaluate
. Also,cross_evaluate
is simplified by usingbattle_against_multi
internally.Player
are made static that don't need theself
value, allowing users of poke-env to use those methods in their own static methods.accept_open_team_sheets
is possible to turn on forOpenAIGymEnv
instances as well as Player instances now.Player
instance is now re-rolled at the beginning of every game played if aTeamBuilder
is specified.choose_move
method ofSimpleHeuristicsPlayer
was fixed where a decision wouldn't be made if the active pokemon on either side is None.