coccoinomane / crabada.py

Crabada bot with automatic reinforce. Snib snib! 🦀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

HighestMp Reinforce Strategy not working

nikohd12 opened this issue · comments

Hello Cocco!

The .env option USER_1_TEAM_1_REINFORCE_STRATEGY="HighestMp" is not working, it still reinforces HighestBp.

In order for this strategy to work, I am currently replacing ReinforceStrategy.py to supply "HighestMp" as a strategy name.

# Create the strategy object and use it to get the crab to borrow strategy: ReinforceStrategy = makeReinforceStrategy("HighestMp", mine, maxPrice) return strategy.getCrab(lootingOrMining)

Additionally (for looting), reinforceAttack is not working. Automating reinforce on looting and settling is a big help already, we can just find match manually.

I have tried the fix suggested here 269275c#r68697734 but it can't find any crabs despite high availability of Bulks (HighestBp)

Hi @nikojaro , thank you for your feedback!

I did not manage to reproduce your issue with the reinforce strategy, it all works fine for me.

I have pushed a new test, could you please try to run it:

python3 -m src.tests.strategies.reinforce.testMakeReinforceStrategy

The test will print the strategy that will be used to reinforce & print the crab that the strategy will choose.
I have run the test on my side and it correctly selects a high MP crab when USER_1_TEAM_1_REINFORCE_STRATEGY="HighestMp", here's a screenshot.

Markup 2022-03-15 at 14 59 56

PS: As for reinforceAttack , there was indeed a bug and I fixed it in the last commit.

Could you please try reinforceAttack again and open a new issue (separate from this one) if you still have problems?

Cheers,
Cocco

Hi @nikojaro , thank you for your feedback!

I did not manage to reproduce your issue with the reinforce strategy, it all works fine for me.

I have pushed a new test, could you please try to run it:

python3 -m src.tests.strategies.reinforce.testMakeReinforceStrategy

The test will print the strategy that will be used to reinforce & print the crab that the strategy will choose. I have run the test on my side and it correctly selects a high MP crab when USER_1_TEAM_1_REINFORCE_STRATEGY="HighestMp", here's a screenshot.

Markup 2022-03-15 at 14 59 56

Working correctly now.

src.common.logger - INFO - Borrowing crab 9230 for mine 2440900 at 20 TUS... [strategy=HighestMp, BP=220, MP=82]
src.common.txLogger - INFO -  0x4xxxx
src.common.logger - INFO - Mine 2440900 reinforced correctly
src.common.logger - INFO - Borrowing crab 9230 for mine 2440894 at 20 TUS... [strategy=HighestMp, BP=220, MP=82]
src.common.txLogger - INFO -  0x4xxxx
src.common.logger - ERROR - Error reinforcing mine 2440894
src.common.logger - INFO - Borrowing crab 9230 for mine 2440848 at 20 TUS... [strategy=HighestMp, BP=220, MP=82]
src.common.txLogger - INFO - 0x4xxxx
src.common.logger - ERROR - Error reinforcing mine 2440848

P.S I have also tested reinforceDelay yesterday and it was working stable for about 20 hours.

Closing this issue now.