-
-
Notifications
You must be signed in to change notification settings - Fork 126
Make battle pickle
-able
#758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Make battle pickle
-able
#758
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #758 +/- ##
==========================================
+ Coverage 83.38% 84.86% +1.48%
==========================================
Files 39 44 +5
Lines 3918 5200 +1282
==========================================
+ Hits 3267 4413 +1146
- Misses 651 787 +136 🚀 New features to boost your workflow:
|
pickle
-able
76ac897
to
076db9e
Compare
076db9e
to
11c208f
Compare
11c208f
to
69cd1b9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Observation
and ObservedPokemon
are useful for making decisions / inference in choose battle. I don't think we should remove them.
…er could make that happen themselves if they wish
…-tie-gendata-onto-objects-its-huge
93a5a48
to
7314edc
Compare
…-tie-gendata-onto-objects-its-huge
b68b72f
to
b4bc1c3
Compare
b4bc1c3
to
24e2d1a
Compare
…-tie-gendata-onto-objects-its-huge
It's nice to be able to serialize/deserialize objects so you can store them in files and save your current situation. Now you can do that with
Battle
andDoubleBattle
objects!_data
field containingGenData
, and instead just callGenData.from_gen
whenever they need the pokedex or something. This does not lose any performance and we were already doing this in some places, but allows these objects to be pickled now that they aren't carrying a pointer to the giantGenData
object.EmptyMove
object and its associated tests after realizing we never use that anywhere anymore.Battle
andDoubleBattle
objects are now able to do round trip serialize/deserialize withpickle
.Observation
/ObservedPokemon
objects, not necessary now that battle objects are pickle-able, giving us a noticeable speed-up when playing battles.