Movement for "any/all" to angle

User avatar
LuBeNo
Autonomous Entity
Autonomous Entity
Posts: 532

Re: Movement for "any/all" to angle

Post#21 » 23 Aug 2017, 19:08

IMO the 1/distance^factor approach with a factor of 1.5 or 1.25 would be slightly better than the 1/distance approach. It would pay special attention to very near bots.
factor 1.25.png
factor 1.25.png (39.6 KiB) Viewed 983 times
Image
My algorithm of life: if(self.tired) sleep(); else if(self.hungry) eat(); else follow(Jesus);

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Movement for "any/all" to angle

Post#22 » 23 Aug 2017, 21:45

The factor shouldn't change anything.
Remember that the distance between myself and the computed flee position has no effect on the trajectory.

User avatar
GFX47
Dev
Dev
Posts: 2914

Re: Movement for "any/all" to angle

Post#23 » 23 Aug 2017, 22:17

I fixed the implementation of the 1/distance method (it should scale the normalized version of the delta vector instead of the original one).
Also added a x10 multiplier on the final result just to have a better visual feedback.

Miojo
Script
Script
Posts: 37

Re: Movement for "any/all" to angle

Post#24 » 23 Aug 2017, 22:19

assuming you have the positions of each bot on the x,y grid, this is the solution to lubenos proposal. I don't see any reason to add special factors.... Image

pier4r
Skynet
Skynet
Posts: 3389

Re: Movement for "any/all" to angle

Post#25 » 23 Aug 2017, 23:04

Question to lubeno.

I am not sure I understood you but you may have said what I said in telegram already. (discard the rotation of the bot, I mistakenly considered it at first)

An angle has 3 points. Self, the enemy and a third reference to form the angle. Is the third point a fixed point on the map that you identify as North (or South, or East, or West) ?

@MioJo: has said in the chat, could you make the same schema with 3 enemies not laying on the same circle (not that difficult to happen).

edit:Ah wait, I did read your schema not completely. You mean project the enemies on a circle (once could decide to put the radius of the circle on the furthest enemy considered by the selection). Then it should work for any amount of enemies. I'll need to check whether it produces a substancial difference from the average position computed actually.

I do not have problem with the idea. But as this request happened because people thought "ah, I was expecting the average angle from enemies, not the average position", I think when the position would be changed to angles (that needs way more "not so intuitive" decisions, like a third point of reference) could be that a lot of people would say "I was expecting it to be in this way instead". Furthermore it may be more complicated to explain. Aside from the idea from Miojo, that could be easier to explain.

Last but not least - I did not prove it yet (I'll do as soon as I have time, so I can also play the game since I am not playing :sob: ) - if the enemies are static (say, they are shooting), the angles may vary while the self retreats and it may be even less expected.
http://www.reddit.com/r/Gladiabots/wiki/players/pier4r_nvidia_shield_k1 -> Gladiabots CHAT, stats, insights and more ;

mcompany
Autonomous Entity
Autonomous Entity
Posts: 872

Re: Movement for "any/all" to angle

Post#26 » 24 Aug 2017, 02:06

So, I've doing doing some messing around and found out that no, you definitely should just do vector*1/distance. That is one of the worst ways to do it

User avatar
LuBeNo
Autonomous Entity
Autonomous Entity
Posts: 532

Re: Movement for "any/all" to angle

Post#27 » 24 Aug 2017, 08:12

GFX47 wrote:The factor shouldn't change anything.
Remember that the distance between myself and the computed flee position has no effect on the trajectory.

It does. Chris added it here: https://cmrichards.github.io/glad_simul ... RnysFR7S4v
You could try different factors there.
However seems like the 1/distance approach is almost the same if not better.
Image
My algorithm of life: if(self.tired) sleep(); else if(self.hungry) eat(); else follow(Jesus);

MrChris
Automaton
Automaton
Posts: 170

Re: Movement for "any/all" to angle

Post#28 » 24 Aug 2017, 12:05

That map doesn't exist now so the link is dead.

On this map the fleeing unit takes more damage when 1/distance^2:

Flee 1/distance:
https://cmrichards.github.io/glad_simul ... MM8bbKzXdl

Flee 1/distance^2
https://cmrichards.github.io/glad_simul ... 9R6vK6gezj
------------------------------------------------
My in-game name is MrChris

Creator of the unofficial Gladiabots stats page: https://gladiabots-stats.info.tm/mrchris
And the Gladiabots retreatment simulator: https://cmrichards.github.io/glad_simulation

User avatar
Ritter Runkel
Neural Network
Neural Network
Posts: 498

Re: Movement for "any/all" to angle

Post#29 » 24 Aug 2017, 22:52

Second one looks better

sollniss
Automaton
Automaton
Posts: 178

Re: Movement for "any/all" to angle

Post#30 » 24 Aug 2017, 23:04

I would prefer if we divided "move" into "turn" and "move forward".

I would also prefer turn timings and static weapons (you shoot where you look).

This would obviously need angles for everything (closest enemy would need to return an angle).

Return to “Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests