
Hi, Razvan Pistolea
What are Artificial Intelligence Agents with Flocking Behavior
Applications of Flocking Behavior in Games, Movies, Engineering and Architectural Simulation
Journey of exploration and implementation
Understand how Flocking Behavior appears in nature
Discover the mechanics and equations of Flocking
Implement Flocking
Funny scenario about a Big Movie Producer wanting a flock of sci-fi birds and a big money reward for you if you do it fast and believable
Carefully and analytically observe our Earthly flocking birds in their natural habitat
Homework: You must write at least 6 observations
Questions Answers Insights
Why do you think some birds fly together?
Their movement seems orchestrated somewhat. Does each bird have a sheet music telling it where to go?
Does this behavior seem completely random or do some patterns exist?
Can you think of other animals that are not birds but still "flock" as well?
Relevant questions for our hypothesis:
Does a bird look at all the other birds or just at a few of its nearby neighbors?
Do birds bump into each when they fly or are they separated?
Do birds in the same group or cluster fly in the same direction and with an approximately same speed?
Scientific method:
Structure our Project in a simple text file using Pseudocode
class Agent{
}
class World{
}
class AgentConfig{
}
Create a new project in Unity
Write a simple Move script
Add script statically or dynamically to object
Prefabs in Unity = template, blue print
Agent
World
AgentConfig
Spawn Function
Equations of motion
time
acceleration
velocity
position
trucate acceleration
trucate velocity
Euler forward integration
Rocket science
Stable integration methods, Runge-Kutta
Unity uses the metric system
Go towards the center of mass of all nearby neighbors
Vector cohesion(){
}
Individual separation forces combine to give the resultant force
Vector separation(){
}
Match heading and speed in order to stay withing the flock
Update Prefab
Warning!
Tokyo Drift
LookAt function
Vector alignment(){
}
Combine all forces at the same time in different proportions
Wrap around to keep inside the view
Structure problem
Update loop, Euler integration
Pseudocode + Unity = perfect match, best learning
Cohesion, Separation, Alignment
Tweek Parameters
Ideas=Lines of Code=Simulation
Think it! Build it!
Emergence, split, merge, dance
Complex->Pieces->Recombine
Playground to experiment aspects of Flocking
360 degrees default
180 degrees realistic
angle between 2 vectors
add the refinement to all behaviors
They move closely together
They are moving like a wave
A solo creature or a small flock that wanders purposefully on the map
Jitter vs Smooth = Dumb vs Purpose
Generate a small random target that moves on a circle in from of the agent
Project the target from local space to world space
Update prefab to have a Default Transform
Warning ! the transform scale influences the projection from local space to world space
Extend the Agent Class to make a Predator Class
Avoid Enemies Behavior
Flee Behavior
GetPredators Function
https://aiception.com/ deep learning platform that offers AI as a service
http://www.aicrafters.com/ educational Artificial Intelligence courses
Learn how to create Artificial Intelligent Agents that have Flocking Behavior and apply them to your projects in games or movies. You have seen Flocking behavior in nature, in games, in movies and in architectural simulations but you might have missed it.
The course is project based with the best teach-apply loop:
Both pseudocode and Unity C# lectures complement each other giving you a full perspective.
Best video quality 1080p full HD.
You will have access to the course forum where you can discuss each topic with like-minded, A.I. passionate, students like yourself.
With the help of this course you will be able to understand a piece of nature and replicate it, essentially reverse engineer a piece of nature. Invest in yourself and add Flocking to your A.I. skill set! Follow this Unleash A.I. series.
Still unsure? Dive in and learn, and if you are not satisfied you get a 30 day money back guarantee! No questions asked.