Skip to main content

Evolved

I've successfully tested trait inheritance in my water peas.

This happens quicker the more frequently that reproduction occurs, so I set their reproductive rate very high and then constructed an environment in which, if any peas were to survive, they would have to evolve. In order to eat, they would have to pass through a small hole. Needless to say, many water peas died of starvation because they were too big to fit through the hole. But not all.

It didn't take long until I noticed that the entire population of water peas was smaller than the earlier generations. That trait, being the only one that was heavily favored by the environment, ended up expressing itself the most strongly. Those that were able to eat were able to survive long enough to reproduce.

Interesting!

Comments

Popular posts from this blog

Collisions with line intersections

Collisions can be determined by testing for line intersections. Imagine a line representing the ground and an object above, falling down. At time t1 , take the center point  p1  of the object. At time t2 , move the object down and take the center point p2 of the object. If the line formed by endpoints (p1, p2) intersect the ground line, a collision has occurred. On a collision, reset the object to its original position before the movement. When a collision occurs, be sure to reset the object by the same point used to determine the line intersection. In this example, I use the center point, so the object should be reset by the center point, not its actual x, y (usually top left) coordinate. It is not always the case that resetting by the x, y coordinate is sufficient. This can be seen in the following picture. It can be seen that even if the object isn't moving, but its size changes, a line intersection can occur, and resetting the object to its x, y position will...

Momentum transfer

This image shows different possible paths that result in a collision. Intuitively, we know which way the object should continue along the wall. Determining this mathematically is a bit more challenging. The object could go in one of two directions. That is, it could follow the wall one way or the other. But why should it prefer one direction over another? We need a generalized rule that applies for every wall and every angle of approach. The rule is that momentum is transferred along the path of least resistance . Least resistance is the difference between the wall angle and the angle of approach that is less than 90 degrees. This raises the issue that a line's angle is determined by its direction. This means that the end point we start with determines the angle of the line. See the line below. Is it a 45 degree line, or a 225 degree line? It depends on which point you start from. But, for a generalized rule of momentum transfer, the answer shouldn't matter. ...

Moving with Trigonometry

These are some thoughts on Trigonometry that I wanted to write down, and someone, somewhere may want to read. But probably not. If you're not into it, turn back immediately. In a top-down view on a two dimensional plane, you can face any direction and move in a forward direction by moving on the x-axis by the cosine of your rotation and moving on the y-axis by the sine of your rotation. This seems to require a physical orientation in the world, but this physical limitation is only on the surface. We can take one step back and use these abilities in more subtle ways. Imagine a side view on a plane in which you can move left and right, and jump up and fall back down to the ground. Let us first think of the left and right movement in terms of trigonometry. Facing right means 0 degrees and so we can move on x by the cosine of our rotation. Facing left is 180 degrees, and we move on x by the cosine of our rotation. Let's maintain a logical rotation factor called xf . When sta...