gs-boids

This is a boids library using GraphStream.

License

License

Categories

Categories

GraphStream Business Logic Libraries Science
GroupId

GroupId

org.graphstream
ArtifactId

ArtifactId

gs-boids
Last Version

Last Version

1.1
Release Date

Release Date

Type

Type

jar
Description

Description

gs-boids
This is a boids library using GraphStream.
Project URL

Project URL

http://graphstream-project.org
Source Code Management

Source Code Management

https://github.com/graphstream/gs-boids

Download gs-boids

How to add to project

<!-- https://jarcasting.com/artifacts/org.graphstream/gs-boids/ -->
<dependency>
    <groupId>org.graphstream</groupId>
    <artifactId>gs-boids</artifactId>
    <version>1.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.graphstream/gs-boids/
implementation 'org.graphstream:gs-boids:1.1'
// https://jarcasting.com/artifacts/org.graphstream/gs-boids/
implementation ("org.graphstream:gs-boids:1.1")
'org.graphstream:gs-boids:jar:1.1'
<dependency org="org.graphstream" name="gs-boids" rev="1.1">
  <artifact name="gs-boids" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.graphstream', module='gs-boids', version='1.1')
)
libraryDependencies += "org.graphstream" % "gs-boids" % "1.1"
[org.graphstream/gs-boids "1.1"]

Dependencies

compile (3)

Group / Artifact Type Version
junit : junit Optional jar 4.4
org.graphstream : gs-core Optional jar 1.3
org.graphstream : gs-algo Optional jar 1.3

Project Modules

There are no modules declared in this project.
 _______ _______       ______  _______ _________ ______  _______
(  ____ \  ____ \     (  ___ \(  ___  )\__   __/(  __  \(  ____ \
| (    \/ (    \/     | (   ) ) (   ) |   ) (   | (  \  ) (    \/
| |     | (_____ _____| (__/ /| |   | |   | |   | |   ) | (_____
| | ____(_____  )_____)  __ ( | |   | |   | |   | |   | |_____  )
| | \_  )     ) |     | (  \ \| |   | |   | |   | |   ) |     ) |
| (___) |\____) |     | )___) ) (___) |___) (___| (__/  )\____) |
(_______)_______)     |/ \___/(_______)\_______/(______/\_______)

A framework for boids simulation in GraphStream

The gs-boids package provide an easy way to create a boid-like simulation and extract from it a dynamic graph. The basic idea is to consider one or more species of boids, each with its own parameters as defined by Craig Reynolds, and to associate with each of these boids a node in a graph. Then for each boid that actually sees another we create an edge. As the boids move in space they see different other boids and therefore the edge set evolves.

Boids

The term boid comes from bird-oid, that is something that mimics the behavior of a real bird flying in flock. They where first imagined by Craig Reynolds as a way to simulate realistic flocks of birds, school of fiches, herds of animals, etc.

The principle is quite simple: each boid has three main behaviors:

  • Separation: it tries to avoid colliding others.
  • Cohesion: it tries to remain grouped with the others.
  • Alignment: it tries to remain in the overall direction of others.

Boids have a limited angle and distance of vision, and therefore only consider others in a small area.

The simulation is iterative, at each step, each boid will consider its neighbors in its vision area and will try to apply the three main behavior laws to determine its new direction and eventually speed.

The result is a simulation where individuals form groups or flocks that fly together, can be split in subgroups or at the contrary merge in one big group.

Some variations can be added to such a simulation, like adding the notion of species, with several groups of boids having distinct parameters, some of them eventually fleeing when seeing another group (like a prey and a predator).

This boid simulation

This boid simulation uses this same model, adding the idea of species, as well as some more parameters to fine tune the way groups appear, evolve and disappear.

Graphs from the simulation

By representing each boid with a node, and the visual interaction by an edge (a boid that sees another creates such an edge), we can define an evolving dynamic graph where edges are added or removed dynamically as groups form or disappear.

This is the basic idea of this module. This allows to build a large set of dynamic graph with various properties for testing algorithms on them.

Building

As a facility a Maven POM file is provided to build this module. You will need the gs-core module to use it.

Using

TODO.

org.graphstream

GraphStream

Versions

Version
1.1
1.0