View source for Talk:SimpleBot/Version History

From Robowiki
Jump to navigation Jump to search

Contents

Thread titleRepliesLast modified
Needed Amount To Kill407:37, 28 August 2017

Needed Amount To Kill

As I see from your version history you don't calculate needed amount to kill the robot precisely. I use this code:

            double robotEnergy = a.getEnergy();
            double neededAmountToKill;
            if (battleInfo.energy <= 4) {
                neededAmountToKill = battleInfo.energy / 4;
            } else {
                neededAmountToKill = (battleInfo.energy + 2) / 6;
            }

This may help you to improve SimpleBot.

Dsekercioglu (talk)20:32, 27 August 2017

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:Talk:SimpleBot/Version History/Needed Amount To Kill/reply.

You can roll a value to x.y5 to create that bug. As I know the you gain 3 * damageGiven energy not 3 * firePower and energy doesn't effect the total score. I would say don't waste energy.

Dsekercioglu (talk)07:37, 28 August 2017
 

Oops, just reviewed my code. It will even try to use a higher bullet power (which is considered good) even if and only if the current power is enough to kill. This used to be a bug but now it is a feature, as it seems to improve the performance.

Say if your bot has 0.05 energy, it will try to kill you with a bullet that deals 4.00 damage, which is ridiculously.

Xor (talk)04:22, 28 August 2017
 

But I think waste some energy when you have much more energy than your opponent to avoid risking not killing your opponent as soon as possible is better than saving some energy while prolonging the battle.

The result is that even against top bots, it wins a lot at end battles (in my observation).

Xor (talk)04:25, 28 August 2017