Skip to content
videodb
VideoDB Documentation
  • Pages
    • Welcome to VideoDB Docs
    • Quick Start Guide
      • Video Indexing Guide
      • Semantic Search
      • Collections
      • Public Collections
      • Callback Details
      • Ref: Subtitle Styles
      • Language Support
      • Guide: Subtitles
      • How Accurate is Your Search?
    • Visual Search and Indexing
      • Scene Extraction Algorithms
      • Custom Annotations
      • Scene-Level Metadata: Smarter Video Search & Retrieval
      • Advanced Visual Search Pipelines
      • Playground for Scene Extractions
      • Deep Dive into Prompt Engineering : Mastering Visual Indexing
      • How VideoDB Solves Complex Visual Analysis Tasks
      • Multimodal Search: Quickstart
      • Conference Slide Scraper with VideoDB
    • Examples and Tutorials
      • Dubbing - Replace Soundtrack with New Audio
      • VideoDB: Adding AI Generated voiceovers to silent footage
      • Beep curse words in real-time
      • Remove Unwanted Content from videos
      • Instant Clips of Your Favorite Characters
      • Insert Dynamic Ads in real-time
      • Adding Brand Elements with VideoDB
      • Elevating Trailers with Automated Narration
      • Add Intro/Outro to Videos
      • Audio overlay + Video + Timeline
      • Building Dynamic Video Streams with VideoDB: Integrating Custom Data and APIs
      • AI Generated Ad Films for Product Videography
      • Fun with Keyword Search
      • Overlay a Word-Counter on Video Stream
      • Generate Automated Video Outputs with Text Prompts | VideoDB
      • Eleven Labs x VideoDB: Adding AI Generated voiceovers to silent footage
      • VideoDB x TwelveLabs: Real-Time Video Understanding
      • Multimodal Search
      • How I Built a CRM-integrated Sales Assistant Agent in 1 Hour
      • Make Your Video Sound Studio Quality with Voice Cloning
      • Automated Traffic Violation Reporter
    • Live Video→ Instant Action
    • Generative Media Quickstart
      • Generative Media Pricing
    • Video Editing Automation
      • Fit & Position: Aspect Ratio Control
      • Trimming vs Timing: Two Independent Timelines
      • Advanced Clip Control: The Composition Layer
      • Caption & Subtitles: Auto-Generated Speech Synchronization
      • Notebooks
    • Transcoding Quickstart
    • director-light
      Director - Video Agent Framework
      • Agent Creation Playbook
      • Setup Director Locally
    • Workflows and Integrations
      • zapier
        Zapier Integration
        • Auto-Dub Videos & Save to Google Drive
        • Create & Add Intelligent Video Highlights to Notion
        • Create GenAI Video Engine - Notion Ideas to Youtube
        • Automatically Detect Profanity in Videos with AI - Update on Slack
        • Generate and Store YouTube Video Summaries in Notion
        • Automate Subtitle Generation for Video Libraries
        • Solve customers queries with Video Answers
      • n8n
        N8N Workflows
        • AI-Powered Meeting Intelligence: Recording to Insights Automation
        • AI Powered Dubbing Workflow for Video Content
        • Automate Subtitle Generation for Video Libraries
        • Automate Interview Evaluations with AI
        • Turn Meeting Recordings into Actionable Summaries
        • Auto-Sync Sales Calls to HubSpot CRM with AI
        • Instant Notion Summaries for Your Youtube Playlist
    • Meeting Recording SDK
    • github
      Open Source
      • llama
        LlamaIndex VideoDB Retriever
      • PromptClip: Use Power of LLM to Create Clips
      • StreamRAG: Connect ChatGPT to VideoDB
    • mcp
      VideoDB MCP Server
    • videodb
      Give your AI, Eyes and Ears
      • Building Infrastructure that “Sees” and “Edits”
      • Agents with Video Experience
      • From MP3/MP4 to the Future with VideoDB
      • Dynamic Video Streams
      • Why do we need a Video Database Now?
      • What's a Video Database ?
      • Enhancing AI-Driven Multimedia Applications
      • Beyond Traditional Video Infrastructure
    • Customer Love
    • Join us
      • videodb
        Internship: Build the Future of AI-Powered Video Infrastructure
      • Ashutosh Trivedi
        • Playlists
        • Talks - Solving Logical Puzzles with Natural Language Processing - PyCon India 2015
      • Ashish
      • Shivani Desai
      • Gaurav Tyagi
      • Rohit Garg
      • Edge of Knowledge
        • Language Models to World Models: The Next Frontier in AI
        • Society of Machines
          • Society of Machines
          • Autonomy - Do we have the choice?
          • icon picker
            Emergence - An Intelligence of the collective
        • Building Intelligent Machines
          • Part 1 - Define Intelligence
          • Part 2 - Observe and Respond
          • Part 3 - Training a Model
      • Updates
        • VideoDB Acquires Devzery: Expanding Our AI Infra Stack with Developer-First Testing Automation

Emergence - An Intelligence of the collective

Ashutosh Trivedi
Societies are very common in nature. I am sure you might have noticed the coordinated flying behavior of a flock of birds. They look so beautiful, like a dance. I had the privilege to see many migratory birds every season while growing up in foothills of Himalayas.
image.jpeg
Ever wondered how do they do that? Specially, when no one is guiding them. There is no central command which govern that pattern, still they are able to do it. What is it, that each bird is doing which is making it possible? I am sure birds are not that complicated and it’s not possible to communicate this within the group in advance.
I can’t imagine birds doing mock drills.
image.jpeg
You might be wondering...
Why did I suddenly got interested in bird’s psychology or their social dynamics, leaving my pursuits of Artificial Intelligence?
Okay, let’s get sane with this.
In previous posts we got introduced to Emergence. A property of the system - a complex behavior as a consequence of simple actions taken by simple agents. Now, we'll go in details of it. The dance of the flock is an emergent pattern or behaviour and I am trying to understand how is it possible to create such patterns with independent agents with simple actions.
But why would I want to do that? - Do you know we are talking about something which won a man an Oscar, the academy award? Craig Reynolds created an emergent pattern in 1986 which was later used in a 1992 movie Batman Returns to show swarm of bats and in another scene penguins army marching towards Gotham city. Reynolds won the 1998 .
image.jpeg
To simulate the flocking behavior, instead of writing a program which can govern the behavior of the whole flock, he created independent agents which follow simple rules. He did the right thing, because doing it any other way will not make the animation look natural.
image.jpeg
He created agents which were bird like - “bird-oid-object” or Boids. Boid is certainly a better name than “bird-oid-object”.
Boid is an artificial life simulation and a very famous emergence example. Similar to Game of Life, this is an iterative game.
Each agent has its own computing power ( very tiny ) and at each iteration they take action from an action set, governed by the rules. Before the rules, let’s understand how can we describe a boid.
image.jpeg



image.jpeg
Each boid has a neighborhood, characterized by the distance and the angle. Each boid reacts only to the other boids in its neighborhood. Boids outside the neighborhood are ignored. Similar to the flock mate of a bird ( the nearby birds ).
By looking at boids in the neighborhood each boid adheres to three very simple rule - Separation, Alignment and Cohesion.
image.jpeg

Separation - Each boid attempts to maintain a reasonable amount of distance between itself and any nearby boids, to prevent overcrowding.In game of life too, we have a rule of overcrowding - If more than 3 neighborhood cells are alive then the cell die.
image.jpeg


Alignment - Each boid try to change its position so that it corresponds with the average alignment of other nearby boids. Steer to avg. alignment of the flock mates by adjusting the angle.
image.jpeg

Cohesion - Each boid attempts to move towards the average position of other nearby boids.

At each iteration every boid adjust its position and angle according to the above three rules. Just these simple rules can simulate complex and interesting realistic behaviors. We can also add another rule for obstacle avoidance and have boids avoiding obstacles and rejoining the groups.
This kind of emergent intelligence is also called - “swarm intelligence”
image.jpeg
The boids model has been applied to some very unrelated fields - automatically program Internet multi-channel radio stations, visualizing information and for optimization of certain tasks.

I have used boids with obstacle avoidance in my research work ( published in ). We created an agent based model, which helps in designing safer open gatherings by preventing stampede and other life threatening situations during emergency evacuations. We also simulated psychological and physical factors which build panic in humans in such situations. This research also helps in designing custom evacuation strategies.
I believe that these methods are powerful and what can be of better use of it than to help save lives. The paper is available
, for serious researchers to consider.
The implementation and videos are open source and available for all to engage.
Now, we know that simple behaviors collectively can produce complex emergent behaviors. We can use this method as a tool to design the emergent behavior we want in our multi agent system. Look at these humans -
image.jpeg
Let me give you a situation - There are bunch of agents and they all have to get something from a counter. If they get the thing they will exit and leave the game. Objective of these agents is to get to the counter. Can you design agents such that they form a lane rather than herding towards the counter? We need cooperation in agents. What can be the simplistic rules each agent has to follow that lane is an outcome or emergent behavior of the whole system?
I’ll leave you with this problem to ponder and you are welcome to provide your solutions.

Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.