barolet / kovans-ogbot

Automatically exported from code.google.com/p/kovans-ogbot
0 stars 0 forks source link

Cargo ships dont attack on the right number. #194

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
ENGLISH ONLY. Thank you.

What steps will reproduce the problem?
1. The bot dont make the right calculation between resourses available for
take and number of ships required for complete.

What version of the product are you using? On what operating system? What
language is the OGame server in?

Linux, .com.es

Please provide any additional information below.

(The follow text is just one example)
If the bot find one planet with 100k of resourses we have 50k ready for be
stolem, the bot maybe send 5 small cargos or a wrong number for take 50k.

Thank you for your time and great job.

Original issue reported on code.google.com by vietna...@gmail.com on 7 Jun 2007 at 7:16

GoogleCodeExporter commented 8 years ago
I saw this fact ...
And I've modified the code to reduce cargos size while calculating capacity 
needed.
(Just multiplying by 0.83 whats mean cargos with capacity of 20.75 and send more
cargos than needed)

in OGBot.py ...
    def attackPlanet(self, sourcePlanet, targetPlanet, attackingShip, abortIfNoShips
= True):
        ...
        ships = math.ceil((resourcesToSteal + producedMeanwhile).total() /
(attackingShip.capacity*0.83))

I know that this solution is not a good thing beacause most of the times, the 
bot
send to much cargos but I don't develop in python and I don't know how to 
translate
my capacity calculator ( written in visual basic 6 ).

I Did one that works on excel, it acquire the spy reports and compute the 
capacity
needed ( an then the fleet to send ) to get 50% of the ressources.

There is no way to compute this simply and my model is quite complex ( almost as
complex a speedsim's ).

If someone is interested, I could help ...
It took me 1 mounth to write a working calcultation algorythme :D

Original comment by HenryZ...@gmail.com on 8 Jun 2007 at 10:13

GoogleCodeExporter commented 8 years ago

Original comment by jsceballos on 9 Jun 2007 at 10:05