In my last zombie post, I looked at a human moving in a circle to avoid a zombie (if they are stuck in a room). What if I build a zombie evading robot that always moves perpendicular to the path of the zombie? Would this work?
This shouldn't be too difficult to model. I can use my existing model for the zombie (where there is a force towards the human and a drag force). For the right-turning-robot, I will also have a drag force and a "driving" force. How do I find the direction of the driving force for the robot? Here is a diagram.
This Fdrive force will really be the frictional force between the robot and the ground. But, how do I determine the direction. The key is that it is perpendicular to the velocity vector for the zombie. It is also perpendicular to the z-direction (if I take the z-direction as up from the ground). If I use the cross product of the direction of the zombie velocity and the z-direction, it will give a vector perpendicular to both of those.
Other than that, the robot will have a drag force and a "driving force". On to the model:
So, let me start with similar conditions as the circle moving human. I will start with the zombie 5 meters away and the robot moving 10% faster than the zombie. Bad things happen. Here is the output (the movie would be boring):
The robot gets zombified. Remember that this worked for a circle moving human. In this case, the robot doesn't really move in a circle (well, at least not until it is too late). Also, it doesn't matter how far away the robot and zombie start, the same thing happens.
Obviously, I need to increase the speed. Increasing the speed of the robot to twice that of the zombie helps - but it is still not too good.
In this case the zombie ends up being 0.6 meters away from the robot, but at a stable orbit. Actually, the first time it was stable but still too close (final distance of 0.12 meters). Clearly I need to plot stable distance as a function of robot speed. I can do that.
If you wanted a robot to stay about 0.5 meters away from the zombie, it would have to go about twice the speed of the zombie.
Still circles
In this case, the stable motions are still circles. The relationship <from before must still hold true:
However, there is something different. Since the velocity of the robot is perpendicular (in the stable case) to the velocity of the zombie, the positions of the robot and zombie in their circles will be different - different phase if you will.
I guess it would be better to just set the robot to move in a circle. I think the problem is that the zombie moves slow enough that it can turn relatively quickly. I wonder what would happen in a room with an ice floor.
- Log in to post comments
The problem is that the robot is moving relative to the zombie, whereas the person in the room was moving relative to the room. Try a rule of 'in open space, move directly away from the zombie. On collision with a wall, move along the wall in whichever direction results in greater distance from the zombie. In case of a tie, turn right.' That will result in circular motion if the robot starts out in a room with a zombie, and will result in escape as long as the speed difference is sufficient to result in escape when movement first shifts from linear to circular. It won't work properly for some wall setups, but I don't think any rule that doesn't involve more complete analysis of the map will work.