manny405 / sapai

Super auto pets engine built with reinforment learning training in mind
MIT License
66 stars 21 forks source link

Preparations for New Pet Pack #71

Open manny405 opened 2 years ago

manny405 commented 2 years ago

It would be great to get a jump on the new pet pack. With the enormous increase in diversity of pets and abilities, SAP becomes an even better target for AI models to significantly out-perform human players. I hope we can begin preparations soon, while keeping in mind that the new pets are all still in beta.

jimkaal commented 2 years ago

Been keeping track of all the changes and additions in this google sheets: https://docs.google.com/spreadsheets/d/1S63p-v72JSPua9J2diadca-78V1qMGOIeNMrOsWuL4Q/edit?usp=sharing

jimkaal commented 2 years ago

I am hesitant to completely start adding some of the new pets already, there have been some major reworks to certain abilities in the last few test patches. (also need to fix and look for a few more engine issues that are open, some are pretty impactful) We can start a discussion on some of the new implementation directions, since the superautopets-db might not be updated anymore (no merges in 2 months now).

Iguana/Armadillo/Piranha with multiple Triggers:

Iguana:
"trigger": ["Summoned", "Pushed"],
"triggerBy": {
    "kind": "EachEnemy"
}

Atlantic Puffin and Cassowary scale based on amount of strawberry friends, in Cassowary's case even limiting how many friends. Same for Hammershark with kind 'PerLevel3Friend' and gold. Frilled Dragon with kind 'PerFaintAbilityFriend'. Moose with kind 'PerTier4PlusInShop'. Lynx DealDamage by 'TotalLevelOfFriends'. Stegosaurus 'PerTurn'. Ostrich by 'LowestPetTierInShop'. Im currently thinking of a 'condition' (or different name) object that will get the same treatment as 'get_target', pass over a bunch of cases and return the real attack/health/damage amount the effect should do.

Cassowary:
"kind": "ModifyStats",
"target": {
    "kind": "Self"
},
"condition": { 
    "kind": "PerStrawberryFriend",
    "n": 1
},
"attackAmount": 1,
"healthAmount": 1

Atlantic Puffin:
"kind": "DealDamage",
"target": {
    "kind": "RandomEnemy",
    "n": 1
},
"condition": {
    "kind": "PerStrawberryFriend",
},
"amount": 2

Lion's start of turn trigger has an 'if it is the highest tier'. Probably "triggeredBy": "SelfHighestTier" ?

Orca is currently summoning pets from any pack, regardless of which youre playing. I have yet to look at the pack selection implementation, so I dont know if this will have a large impact.

Sabertooth Tiger / Tapir can SummonPet with a target. They might throw some errors when the targetted pet is a Zombie-Pet, which dont have base stats (yet) in data.py.

Tapir/Alpaca have some exceptions, maybe implement those in data.py too instead of in code? Thinking of zombie fly not summoning another zombie fly, which is currently defined in faint_trigger. Definitely with more and more pets having this exception, it is probably cleaner if that was in data.py.

Tapir:
"effect": {
    "excluded": ["pet-tapir"]
}
if trigger.name in "excluded":

Tapir summoning a butterfly is probably an excellent unittest. And with Butterfly now able to spawn as 3/3, attack priority will be important again. Will have to combine friend_summon_trigger and self_summon_trigger on the same place/function. And friend_summon_trigger also needs to be expanded to check enemies, since Aardvark triggers on that now.

Porcupine, hits the pet that hurt it, which we are not keeping track of at all. Will need to expand hurt with more details of who hurt that pet.