Suggested Formal Description of the Behavior/AI of Chickens

J Young Kim

New Member
Contributor
Design
#1
With eggs introduced in Terasology via the Cooking module (https://github.com/Terasology/Cooking/blob/master/assets/prefabs/food/raw/Egg.prefab), it would be appropriate to get eggs from chickens instead of a terminal. Although chickens can be created via the WildAnimals module (still in progress (https://github.com/Terasology/WildAnimals)), an AI will be required to fully implement chickens.

Sources Used:
*For simplicity purposes, there will be chickens and NO roosters.

Natural Behaviors
  • Walking: The walking behavior will be simply the chicken walking around. The walking animation will be specific though. Like a chicken, the walking animation would consist of the chicken to jerk its head back and forth while walking.
  • Default/Idle: The default/idle behavior of the chicken would be quite simple. The chicken will mainly wander around (walking). The chicken will also use a Need-Based AI (http://forum.terasology.org/threads/ai-crowd-simulation.1682/) to break out of the default/idle behavior.
  • Eating: Chickens, are actually omnivores, meaning that they will eat both vegetation and meat. Chickens can be primarily be fed seeds, but when on their own, they can also eat small insects and mice. The chickens' eating animation will consist of the chicken pecking at the floor or whatever it's trying to eat.
  • Drinking: The chicken will also drink fluids to stay hydrated. The drinking animation will look similar to the eating animation, except the beak will stay in the fluid for a few moments before it raises its beak up again to normal position.
  • "Clucking": This is a sound that the chickens will make occasionally. These sounds will mainly occur during any national behavior unless there's a conflicting action (i.e. the chicken can cluck after a bite of its food, but not during the bite).
  • Laying Eggs: Chickens have two main purposes, to give us good chicken meat and to give us eggs for breakfast! By default, the chicken will lay eggs, but this will be not a too frequent occurrence, nor too rare. These eggs will be poisonous to eat immediately, so 'cleansing' them or cooking them will be required (to be implemented for the Cooking Module). The laying egg animation will primarily be the chicken sitting down, staying there for a few moments, and standing back up to do whatever the Needs-Based AI wants while leaving an egg on the spot the chicken sat at. This, is the whole reason why this description was created :D
  • Sunbathing: Oddly enough, like humans and dogs, chickens enjoy the act of sunbathing. The sunbathing action could possibly just be a chicken sitting in the sun. This action could be invoked when the chicken has nothing to do and there happens to be sun.
  • Foraging: Chickens are foragers, meaning that they search for food. The chicken can be shown to do this by having the chicken poke around the floors as he or she wanders a small area. Once food is found, the Tidbitting Dance can be evoked. This foraging action should primarily be done if the chicken is hungry.
Behaviors Induced by an External Force
  • "Attempting to Fly": When hit or dropping from a high spot, the chicken will flap its wings heavily to 'fly'. The chicken will make a squawking noise, and then proceed to 'fly' as well as running away from the player if hit by the player. In addition, if the chicken is dropping from any height, it'll slowly descend. The flying animation will primarily be the chicken flapping its wings crazily.
  • 'Tidbitting' Dance: This dance is performed by a chicken (rooster to be technical) to tell other chickens that food is found. The dance consists of the chicken making food calls (sounds) while picking up and dropping food many times. A video showing the 'dance':
  • "Sitting for Laying Eggs": Chickens can be forced into a nest by the player. If this is the case, the chicken will not move at all, and the chicken will just lay eggs. However, if the chicken is in distress (i.e. player forgot to feed it), then the chicken will just break out. As long as the chicken is happy, it'll say in the nest, and the player can check the nest for eggs. For this to work however, a nest block has to be created.
  • "Running Away from Predators": The chickens will naturally be fearful of known predators. For instance, if a wolf comes near the chicken, the chicken will start immediately moving away. There can be a parameter for the chicken telling it to stand X blocks away from wolves at all times. Of course, the running speed of the chicken can be set to be slower than wolves so that the wolves can eventually catch the chicken to eat. While running, the chicken will be squawking crazily. THIS BEHAVIOR ONLY OCCURS IF THE CHICKEN DOES NOT HAVE A CHICK TO PROTECT.
  • Squawking in the morning: Although it's the rooster that does the action, for now, the chicken can be the one that squawks in the morning. The chicken will stereotypically make a loud sound in the mornings (~6 AM), and could be the first thing a player hears when it wakes up from sleeping.
  • Protecting the Chicks: In the presence of chicks, the chickens are very protective of their younglings. In the case that a predator comes, the chickens will not run, but rather stay and protect the young. The chickens can create a formation surrounding the chicks, and damage any living being attempting to harm the chicks. The chickens can start create noises in an attempt to scare the enemies off.