{"action":"created","issue":{"url":"https://api.github.com/repos/ondras/rot.js/issues/78","labels_url":"https://api.github.com/repos/ondras/rot.js/issues/78/labels{/name}","comments_url":"https://api.github.com/repos/ondras/rot.js/issues/78/comments","events_url":"https://api.github.com/repos/ondras/rot.js/issues/78/events","html_url":"https://github.com/ondras/rot.js/issues/78","id":110584285,"number":78,"title":"Dijkstra Maps implementation","user":{"login":"hyakugei","id":136433,"avatar_url":"https://avatars.githubusercontent.com/u/136433?v=3","gravatar_id":"","url":"https://api.github.com/users/hyakugei","html_url":"https://github.com/hyakugei","followers_url":"https://api.github.com/users/hyakugei/followers","following_url":"https://api.github.com/users/hyakugei/following{/other_user}","gists_url":"https://api.github.com/users/hyakugei/gists{/gist_id}","starred_url":"https://api.github.com/users/hyakugei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyakugei/subscriptions","organizations_url":"https://api.github.com/users/hyakugei/orgs","repos_url":"https://api.github.com/users/hyakugei/repos","events_url":"https://api.github.com/users/hyakugei/events{/privacy}","received_events_url":"https://api.github.com/users/hyakugei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-09T04:02:59Z","updated_at":"2015-10-27T11:13:59Z","closed_at":null,"body":"Hey all. \r\n\r\nI read about using \"[Dijkstra Maps][2]\" for AI (see below links). I decided to give it a try, and came up with this implementation: https://gist.github.com/hyakugei/ace116bd9ce72f2bf92c\r\n \r\nThe visualization stuff on the index.html demo page is similar to the images on the \"[Dijkstra Maps Visualized][1]\" page. I tried to follow the same design style as the FOV or Map bits of Rot.js (using callbacks so as to not proscribe the data storage format). I don't know if it fits into Rot.js, or is better left as a gist/project on its own, but i thought i'd ping ya'll and see what you think.\r\n\r\nComments, suggestions etc welcome. \r\n\r\nNote - hex map formatting is not currently supported. I'm not sure how easy/hard it would be to do this. \r\n\r\n[2]: http://www.roguebasin.com/index.php?title=The_Incredible_Power_of_Dijkstra_Maps\r\n[1]: http://www.roguebasin.com/index.php?title=Dijkstra_Maps_Visualized\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/27278655-dijkstra-maps-implementation?utm_campaign=plugin&utm_content=tracker%2F297828&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F297828&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/ondras/rot.js/issues/comments/151458601","html_url":"https://github.com/ondras/rot.js/issues/78#issuecomment-151458601","issue_url":"https://api.github.com/repos/ondras/rot.js/issues/78","id":151458601,"user":{"login":"ondras","id":192172,"avatar_url":"https://avatars.githubusercontent.com/u/192172?v=3","gravatar_id":"","url":"https://api.github.com/users/ondras","html_url":"https://github.com/ondras","followers_url":"https://api.github.com/users/ondras/followers","following_url":"https://api.github.com/users/ondras/following{/other_user}","gists_url":"https://api.github.com/users/ondras/gists{/gist_id}","starred_url":"https://api.github.com/users/ondras/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ondras/subscriptions","organizations_url":"https://api.github.com/users/ondras/orgs","repos_url":"https://api.github.com/users/ondras/repos","events_url":"https://api.github.com/users/ondras/events{/privacy}","received_events_url":"https://api.github.com/users/ondras/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T11:13:59Z","updated_at":"2015-10-27T11:13:59Z","body":"Several questions for better code understanding:\r\n\r\n1) what is the meaning of the `cost` value for `addTarget`?\r\n\r\n2) how is the \"flee\" feature supposed to work, high-level speaking?\r\n\r\nReminder: a regular Dijkstra algorithm will populate every cell with a numerical value -- the (shortest) distance to the (nearest) zero-point. Zero-points are defined using `addTarget` (so they are, by definition, closest to the nearest zero-point)."}}