Farigh / pokeclicker-automation

An automation script suite for pokeclicker.com
GNU General Public License v3.0
38 stars 21 forks source link

Battle Frontier: Restart when battling slows down #376

Closed andrewfishman closed 4 months ago

andrewfishman commented 4 months ago

The beginning of the BF is great for hatching eggs, but it slows down significantly by the end of a run. I'd like to be able to auto-restart from level 1 as soon as I stop one-shotting everything.

Farigh commented 4 months ago

I'm not sure why you would want this, restarting will lose any progress, and you won't earn any BattlePoint.

Could you explain in which case the player would want to start over and lose progress ? The Focus on Experience is still a great option for hatching pokemons

andrewfishman commented 4 months ago

Got it, I thought that restarting the Battle Frontier as soon as it slows down was the most efficient way to grind eggs if I'm not worried about Battle Points.

Farigh commented 4 months ago

If you can prove a significant improvement over the Focus on Experience option, I'll consider it. But without any tangible data, I'm not convinced it would be a useful option.

Farigh commented 4 months ago

I looked a bit a the pokeclicker's code.

The eggstep gained is computed based on an input number. For battle frontier, it seams to be the current stage number. For routes (which is used by the Focus on Experience), it's computed based on the region and the route number.

On my current save, I have 2874425 click attack.

The route selected by the automation gives the value 120 (using the game's method MapHelper.normalizeRoute(player.route, player.region);).

It would mean that the Battle frontier is only beneficial to my case past the stage 120, and until I can't oneclick every pokémons. Any stage before that would give me less Egg steps.

In my case the Focus on Experience route average health is 2502945 (using the game's method PokemonFactory.routeHealth(player.route, player.region);)

For the BattleFrontier, the method used is the following : PokemonFactory.routeHealth(BattleFrontierRunner.stage() + 10, GameConstants.Region.none) (code ref)

For the stage 120 it gives an average health of 2426285 (which is indeed lower than my click attack) Stage 129 is the last stage lower than my click attack with an average health of 2874038. Stage 130 having an average health of 2926638

Considering there are 3 pokémons for each stage, that would mean that : Using the BattleFrontier method would be sub-optimal for 119 * 3 = 357 battles, giving me, on average, half the steps the Focus method would. And 10 * 3 battles where it would give me a tiny bit more than the Focus method.

It does not seem worth it to me (at least in my save's case)