Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

improving the standard settings (rapid growth of snake) #290

Closed
Seple opened this issue Jun 4, 2016 · 19 comments
Closed

improving the standard settings (rapid growth of snake) #290

Seple opened this issue Jun 4, 2016 · 19 comments

Comments

@Seple
Copy link

Seple commented Jun 4, 2016

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 👍

Have a nice day!

@ChadSki ChadSki modified the milestones: Better Settings and Defaults, Settings and Configuration, Bot Behavior Suggestions Jun 6, 2016
@ermiyaeskandary
Copy link
Owner

@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

@clemens-tolboom
Copy link
Collaborator

@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?

@Seple
Copy link
Author

Seple commented Jun 11, 2016

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

@clemens-tolboom
Copy link
Collaborator

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

@clemens-tolboom
Copy link
Collaborator

Make sure to enable the task SnakeParamsBySize

@Seple
Copy link
Author

Seple commented Jun 11, 2016

Perfect repaired fast growth of a snake!

Thank You very much! ❤️

@clemens-tolboom
Copy link
Collaborator

I'm waiting for your test report :p

@Seple
Copy link
Author

Seple commented Jun 11, 2016

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.

@Seple
Copy link
Author

Seple commented Jun 12, 2016

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 f3e0600
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 :)

@clemens-tolboom
Copy link
Collaborator

@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 #290 (comment) with ```javascript so it color renders

@clemens-tolboom
Copy link
Collaborator

Much better ... committed

@clemens-tolboom
Copy link
Collaborator

Shall we close this as PR #292 hazz da code

@Seple
Copy link
Author

Seple commented Jun 12, 2016

Possible merge the option: "HuntForPrey" ?

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

@clemens-tolboom
Copy link
Collaborator

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.

@Seple
Copy link
Author

Seple commented Jun 12, 2016

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?

@clemens-tolboom
Copy link
Collaborator

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

@Seple
Copy link
Author

Seple commented Jun 12, 2016

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

@clemens-tolboom
Copy link
Collaborator

:)

@Seple
Copy link
Author

Seple commented Jun 12, 2016

Fixed
Please close the topic

@ChadSki ChadSki closed this as completed Jun 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants