I did something silly. I'm finishing up some behavioral changes for an aquatic creature that I'm about to release, called a water pea. For fun, I've been playing with different ideas to show the player interesting behaviors. One of those was teaching water peas to be territorial.
The way to teach a program to "learn" to do anything is called training. It simply means having the program recognize incorrect (undesired) behaviors, and reinforcing positive behaviors. Over time, the program starts combining a multitude of desired behaviors to produce results that were never explicitly programmed in. These results can be...surprising.
I eventually had peas that would fight to protect "their" area of the water tank. But water peas also form friendships, and they won't fight their friends. At least, that was the plan. Most territorial peas simply stayed in their area, along with their friends, and any poor pea that happened to wander by would be killed.
I noticed that in one corner of the tank was a single, large water pea named Bup. He hadn't formed any friendships. In order to make friends, water peas have to meet each other first, but this pea was so aggressive that it killed any pea that it encountered before they could become friends. That's not so bad, but this water pea unexpectedly decided to wander out of its territory, yet continued to remain territorial wherever it went. After awhile, there was a single, solitary, big, mean water pea left in the tank with bodies littering the bottom.
I tried to create a large group of aggressive peas who were all friendly with one another in order to fend off Bup. One by one, he killed them all. While testing behaviors with other peas, I would continually move him to one corner of the tank, but he would somehow find and kill the peas I was working with while I wasn't watching.
Finally I had enough, and dropped Bup out of the tank, killing him. Ultimately, I removed the aggressive behavior system altogether. Water peas are meant to be kind, social little jellies. Except for Bup. He was the meanest pea I've ever seen.
The way to teach a program to "learn" to do anything is called training. It simply means having the program recognize incorrect (undesired) behaviors, and reinforcing positive behaviors. Over time, the program starts combining a multitude of desired behaviors to produce results that were never explicitly programmed in. These results can be...surprising.
I eventually had peas that would fight to protect "their" area of the water tank. But water peas also form friendships, and they won't fight their friends. At least, that was the plan. Most territorial peas simply stayed in their area, along with their friends, and any poor pea that happened to wander by would be killed.
I noticed that in one corner of the tank was a single, large water pea named Bup. He hadn't formed any friendships. In order to make friends, water peas have to meet each other first, but this pea was so aggressive that it killed any pea that it encountered before they could become friends. That's not so bad, but this water pea unexpectedly decided to wander out of its territory, yet continued to remain territorial wherever it went. After awhile, there was a single, solitary, big, mean water pea left in the tank with bodies littering the bottom.
I tried to create a large group of aggressive peas who were all friendly with one another in order to fend off Bup. One by one, he killed them all. While testing behaviors with other peas, I would continually move him to one corner of the tank, but he would somehow find and kill the peas I was working with while I wasn't watching.
Finally I had enough, and dropped Bup out of the tank, killing him. Ultimately, I removed the aggressive behavior system altogether. Water peas are meant to be kind, social little jellies. Except for Bup. He was the meanest pea I've ever seen.
Comments
Post a Comment