Alya-N / C-Hero-Calc

PvE Solver for Cosmos Quest (Last Update: Archers and the Eternals)
10 stars 6 forks source link

Potentially stupid question on # of fights simulated #31

Closed Vitae666 closed 5 years ago

Vitae666 commented 5 years ago

Well, hitting Enter on the Title screen in GitHub posts....didn't know that.

So, here's where I'm wondering... If you are doing a test fight with 3 heroes and 0 monsters, the most fights you can have is 6: {1,2,3} {1,3,2} {2,1,3} {2,3,1} {3,1,2} {3,2,1}

I am getting calcs with either 11, 13 or 15

Enter Hero 1: geror:26.0 Enter Hero 2: aural:75.0 Enter Hero 3: ageum:99.1 Enter Hero 4: done Set a lower follower limit on monsters used: 0 Set an upper follower limit that you want to use: 0 Enter Enemy Lineup(s): quest136-4   Calculating with 0 available Monsters and 3 enabled Heroes. Starting loop for armies of size 1 Starting loop for armies of size 2+   Solution for [quest136-4 | Followers: 812,306,000 | w28 e30 f27 a30 f26 <==]: Could not find a solution that beats this lineup.   11 Fights simulated.

Enter Hero 1: aural:75.0 Enter Hero 2: hunter:99.3 Enter Hero 3: ageum:99.1 Enter Hero 4: done Set a lower follower limit on monsters used: 0 Set an upper follower limit that you want to use: 0 Enter Enemy Lineup(s): quest136-4   Calculating with 0 available Monsters and 3 enabled Heroes. Starting loop for armies of size 1 Starting loop for armies of size 2+   Solution for [quest136-4 | Followers: 812,306,000 | w28 e30 f27 a30 f26 <==]: Could not find a solution that beats this lineup.   13 Fights simulated.  

Enter Hero 1: shaman:99.2 Enter Hero 2: hunter:99.3 Enter Hero 3: ageum:99.1 Enter Hero 4: done Set a lower follower limit on monsters used: 0 Set an upper follower limit that you want to use: 0 Enter Enemy Lineup(s): quest136-4   Calculating with 0 available Monsters and 3 enabled Heroes. Starting loop for armies of size 1 Starting loop for armies of size 2+   Solution for [quest136-4 | Followers: 812,306,000 | w28 e30 f27 a30 f26 <==]: Could not find a solution that beats this lineup.   15 Fights simulated.

Calc Version: 4.3.2.1d

Where are those extra fights coming from? Did I forget something, or not understand another mechanic? Like I said in the title: Potentially Stupid Question :)

EDIT: Ok, most you can have is 15, not 6 because of the

Starting loop for armies of size 1 Starting loop for armies of size 2+

stuff So. add the other 9 possibles: {1} {2} {3} {1,2} {1,3} {2,1} {2,3} {3,1} {3,2} And it's 15. So, what's with the 11's and 13's? Only wondering if it's skipping a potential 3 combo that could win. Prolly not, but still ;-)

FWIW: With 115 Heroes (AGeum excluded in the count) there's 6,670 different combinations of 3 hero teams

Hero 1 Hero 2 Hero 3
shaman:99.2 hunter:99.3 ageum:99.1
alpha:99.2 hunter:99.3 ageum:99.1
alpha:99.2 shaman:99.2 ageum:99.1

etc.. Of those, there were 1,081 - 11 fights simulated 3,243 - 13 fights simulated 2,346 - 15 fights simulated

And it's always the same ones. 11's are always 11's. 13's are 13's. 15's are 15's. No 11's become 13's or 15's each time I run them.

Alya-N commented 5 years ago

I'll try investigating that, but I haven't altered or reviewed any code that's connected to the amount of fights simulated. One assumption may be that it stops earlier because it found a solution, but I'm not entirely sure about that.

Vitae666 commented 5 years ago

Nope. If it was that, I wouldn't be wondering ;-)

Could not find a solution that beats this lineup. 11 Fights simulated.

Could not find a solution that beats this lineup. 13 Fights simulated.

Could not find a solution that beats this lineup. 15 Fights simulated.

So, it's not finding a solution. It's just dropping simulations for some reason :(

Alya-N commented 5 years ago

I'm guessing it might have something to do with the optimization process, which quickly checks if a unit can survive one hit from the last monster without any ability checks before proceeding with expanding the previously saved simulation, if I recall correctly. That only happens if a unit doesn't have an ability that affects units in front of them.

Geror and Aural only affect themselves, so simulating a fight with them against f26 is pointless, since it will be a draw at most. Hunter and Shaman, however, may affect the fight with their buffs, so they are fully simulated.

Vitae666 commented 5 years ago

Ah, that would make sense then. Saves some processing time. Thanks :)