Slither.io-bot: improving the standard settings (rapid growth of snake)

Created on 4 Jun 2016  路  19Comments  路  Source: ErmiyaEskandary/Slither.io-bot

Please if this option is possible to add settings standard ?

foodAccelSize ---> They should be scaled to the size of the snake

Example:
radiusMult 12, + foodAccelSize: 20, + foodRoundSize : 1, ---> to 5,000 points
radiusMult 12, + foodAccelSize: 40, + foodRoundSize : 1, ---> to 10,000 points
radiusMult 12, + foodAccelSize: 60, + foodRoundSize: 10, ---> to more 10,000 points

Please test settings

https://files.gitter.im/ErmiyaEskandary/Slither.io-bot/K8Ri/2h.jpg <--- after 2 hours

https://files.gitter.im/ErmiyaEskandary/Slither.io-bot/TQth/3.5h.jpg <--- after 3,5 hours

My Bot has better results :+1:

Have a nice day!

feedback-needed suggestion

Most helpful comment

The length seems to be

Math.floor(15 * (fpsls[snake.sct] + snake.fam / fmlts[snake.sct] - 1) - 5) / 1

of which none is documented.

I came up with code below added to #275 / #292 ... I left out _ radiusMult_ as that is a constant so you need to set that through the UI yourself.

                    getPriority: function() {
                        // Lower limit of snakeLength criteria used below
                        var lengthGroup;
                        var snakeLength = 0;

                        snakeLength = Math.floor(15 * (fpsls[snake.sct] + snake.fam / fmlts[snake.sct] - 1) - 5) / 1;
                        if (snakeLength == 0) {
                            return 0;
                        }
                        var opt = bot.opt;

                        if (snakeLength < 5000) {
                            lengthGroup = 0;

                            opt.foodAccelSize = 20;
                            opt.foodRoundSize = 1;
                        } else if ( snakeLength < 10000) {
                            lengthGroup = 5000;

                            opt.foodAccelSize = 40;
                            opt.foodRoundSize = 5;
                        } else {
                            lengthGroup = 10000;

                            opt.foodAccelSize = 60;
                            opt.foodRoundSize = 10;
                        }
                        if (lengthGroup != this.lastLengthGroup) {
                            lengthGroup != this.lastLengthGroup;
                            // No need to update UI yet.
                            // userInterface.onPrefChange();
                        }

                        return 0;
                    },

@seple you can test though branch mentioned in #275

All 19 comments

@Seple Please test the current develop bot head to head with another develop bot with your changes for at least 30 games and then post back results - also in the wiki how to test

@Seple what do you mean higher score? Each run I did was so different from expectations :(

I tried to read your table.

radiusMult 12, + foodAccelSize: 20, + foodRoundSize : 1, ---> to 5,000 points
radiusMult 12, + foodAccelSize: 40, + foodRoundSize : 1, ---> to 10,000 points
radiusMult 12, + foodAccelSize: 60, + foodRoundSize: 10, ---> to more 10,000 points

But there is no size of snake with that. How did you test these?

The lowest scores go up (rapid growth of snake) = average results to the top
when setting

radiusMult 12, + foodAccelSize: 20, + foodRoundSize : 1, ---> to 10,000 points

above (more) 10,000 points returns (switch) standard setings

radiusMult 12, + foodAccelSize: 60, + foodRoundSize: 10, ---> to more 10,000 points

foodAccelSize + foodRoundSize ---> They should be scaled to the size of the snake (setting grow along with the growth of snake)

Very please create a code for testing

The length seems to be

Math.floor(15 * (fpsls[snake.sct] + snake.fam / fmlts[snake.sct] - 1) - 5) / 1

of which none is documented.

I came up with code below added to #275 / #292 ... I left out _ radiusMult_ as that is a constant so you need to set that through the UI yourself.

                    getPriority: function() {
                        // Lower limit of snakeLength criteria used below
                        var lengthGroup;
                        var snakeLength = 0;

                        snakeLength = Math.floor(15 * (fpsls[snake.sct] + snake.fam / fmlts[snake.sct] - 1) - 5) / 1;
                        if (snakeLength == 0) {
                            return 0;
                        }
                        var opt = bot.opt;

                        if (snakeLength < 5000) {
                            lengthGroup = 0;

                            opt.foodAccelSize = 20;
                            opt.foodRoundSize = 1;
                        } else if ( snakeLength < 10000) {
                            lengthGroup = 5000;

                            opt.foodAccelSize = 40;
                            opt.foodRoundSize = 5;
                        } else {
                            lengthGroup = 10000;

                            opt.foodAccelSize = 60;
                            opt.foodRoundSize = 10;
                        }
                        if (lengthGroup != this.lastLengthGroup) {
                            lengthGroup != this.lastLengthGroup;
                            // No need to update UI yet.
                            // userInterface.onPrefChange();
                        }

                        return 0;
                    },

@seple you can test though branch mentioned in #275

Make sure to enable the task SnakeParamsBySize

Perfect repaired fast growth of a snake!

Thank You very much! :heart:

I'm waiting for your test report :p

Tempting opportunity (possiblity) to merge option: "HuntForPrey"

With the condition:
Only fast pursuit in distance red circle near the head when it is not crowded by other snakes around.

My test after 5 hours, unfortunately I do not have possibilities more time to test :/

http://s33.postimg.org/s24e0j0un/test.jpg

My test after 8 hours (another computer - laptop).
http://s33.postimg.org/ozbwg7qfj/test2.jpg

Comparing the results above is visible improvement

code:

var customBotOptions = {
targetFps: 40,
radiusMult: 12,
... };

Code f3e060086b6f3e1b1d21e40a4fc4eacfcb8db4fa
Please change:

0 - 5,000 points
opt.foodAccelSize = 20
opt.foodRoundSize = 1;

5,000 - 10,000 points
opt.foodAccelSize = 40;
opt.foodRoundSize = 1;

10,000 - more points
opt.foodAccelSize = 60;
opt.foodRoundSize = 5;

Better :)

@Seple please report back in #275 or PR #292 with your preferred settings. And then no code dumps aka find the differences :-(

I annotated your code in https://github.com/ErmiyaEskandary/Slither.io-bot/issues/290#issuecomment-225414038 with ```javascript so it color renders

Much better ... committed

Shall we close this as PR #292 hazz da code

Possible merge the option: "HuntForPrey" ?

When time the function will be added in the standard code : develop or master?

Possible merge the option: "HuntForPrey" ?

What do you mean by merge the option?

When time the function will be added in the standard code : develop or master?

First step PR must be voted for. Then it ends in develop and next release into master. Unfortunately the performance metrics do not help.

What do you mean by merge the option?

Option to merge into one
HuntForPrey + SnakeParamsBySize = Rapid growth hose

HuntForPrey ---> 1,000 points.
With the condition:

  • Only fast pursuit in distance red circle near the head.
  • When map it is not crowded by other snakes around.
  • Do not chase all over the map.

First step PR must be voted for. Then it ends in develop and next release into master. Unfortunately the performance metrics do not help.

@ErmiyaEskandary This idea ( Better Settings and Defaults) can be added separately?

I've updated HuntForPrey in #275 + #292.

I stop following this issue as my PR is my only interest now. (Kinda sorry)

@Seple we showed your idea is easily implemented by #275

Again thank you very much and sorry for the problem ;)

:)

Fixed
Please close the topic

Was this page helpful?
0 / 5 - 0 ratings

Related issues

phrokton picture phrokton  路  9Comments

jellybabies picture jellybabies  路  7Comments

Drflash55 picture Drflash55  路  5Comments

bernardojedi picture bernardojedi  路  4Comments

Drflash55 picture Drflash55  路  4Comments