{"action":"created","issue":{"url":"https://api.github.com/repos/j-c-m/Slither.io-bot/issues/15","repository_url":"https://api.github.com/repos/j-c-m/Slither.io-bot","labels_url":"https://api.github.com/repos/j-c-m/Slither.io-bot/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/j-c-m/Slither.io-bot/issues/15/comments","events_url":"https://api.github.com/repos/j-c-m/Slither.io-bot/issues/15/events","html_url":"https://github.com/j-c-m/Slither.io-bot/issues/15","id":165080174,"number":15,"title":"Better expansion in circle mode","user":{"login":"khumarahn","id":5206045,"avatar_url":"https://avatars.githubusercontent.com/u/5206045?v=3","gravatar_id":"","url":"https://api.github.com/users/khumarahn","html_url":"https://github.com/khumarahn","followers_url":"https://api.github.com/users/khumarahn/followers","following_url":"https://api.github.com/users/khumarahn/following{/other_user}","gists_url":"https://api.github.com/users/khumarahn/gists{/gist_id}","starred_url":"https://api.github.com/users/khumarahn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/khumarahn/subscriptions","organizations_url":"https://api.github.com/users/khumarahn/orgs","repos_url":"https://api.github.com/users/khumarahn/repos","events_url":"https://api.github.com/users/khumarahn/events{/privacy}","received_events_url":"https://api.github.com/users/khumarahn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-12T13:27:36Z","updated_at":"2016-11-10T15:26:08Z","closed_at":null,"body":"It is getting harder for big snakes to survive. After a video on youtube with over 400000 views, hostile people came to the server with my three big snakes, having names like \"4 millions is too much\". They managed to contract all snakes and finally encircle them.\n\nI feel that the snakes could survive if they were controlled by hand, or if the algorithm of expansion was better. Or we need a new idea.\n\nI am trying to explain how the expansion currently works, as of cf32e7961cdbab7856d00426a86f6080b53dea6d. It is sort of primitive. Maybe someone will have an idea how to make it better.\n\n![img_20160712_132908](https://cloud.githubusercontent.com/assets/5206045/16766948/df60bc26-4834-11e6-8253-8665af539255.jpg)\n\nOn the picture above the line `BC` is the snake's body (tail), and point `A` is the head. The head is moving at an angle `alpha` to the body, and at a distance `h`.\n\nWe try to compute **where** and **how fast** the snake can hide its head. This involves first estimating the emergency **return path** (pencil dashed curve).\n- estimated **return path** starts as an arc of the circle with the radius equal to the snake's width (I think this is how fast it can turn, but I didn't check). When the angle alpha goes down to `-PI/4`, the pencil line continues straight.\n- **where**: point `C`;\n- **how fast**: length of the return path (I don't know how to work with time, so I used path lengths)\n\nNow we have to make sure that we can reach the point `C` before any other snake can get in our way.\n\nWe look at the least distance from hostile snake heads to the point `C`, and compare it to twice the length of the return path. Use this comparison to decide if we should start hiding. The factor of 2 comes from that the other snake may be accelerating.\n"},"comment":{"url":"https://api.github.com/repos/j-c-m/Slither.io-bot/issues/comments/259718714","html_url":"https://github.com/j-c-m/Slither.io-bot/issues/15#issuecomment-259718714","issue_url":"https://api.github.com/repos/j-c-m/Slither.io-bot/issues/15","id":259718714,"user":{"login":"psychedup","id":18059419,"avatar_url":"https://avatars.githubusercontent.com/u/18059419?v=3","gravatar_id":"","url":"https://api.github.com/users/psychedup","html_url":"https://github.com/psychedup","followers_url":"https://api.github.com/users/psychedup/followers","following_url":"https://api.github.com/users/psychedup/following{/other_user}","gists_url":"https://api.github.com/users/psychedup/gists{/gist_id}","starred_url":"https://api.github.com/users/psychedup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psychedup/subscriptions","organizations_url":"https://api.github.com/users/psychedup/orgs","repos_url":"https://api.github.com/users/psychedup/repos","events_url":"https://api.github.com/users/psychedup/events{/privacy}","received_events_url":"https://api.github.com/users/psychedup/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T15:26:08Z","updated_at":"2016-11-10T15:26:08Z","body":"I had another idea the other day - when in circle mode, the snake doesn't ever accelerate. Maybe it could reach out further for food, knowing that it could accelerate back to safety if necessary."}}
{"actor":{"display_login":"psychedup"}}