Modelling and recreating complex, natural flocking and predatory behaviour using a limited rule set. BSc (Hons.) in Computer Science

Size: px
Start display at page:

Download "Modelling and recreating complex, natural flocking and predatory behaviour using a limited rule set. BSc (Hons.) in Computer Science"

Transcription

1 Modelling and recreating complex, natural flocking and predatory behaviour using a limited rule set. BSc (Hons.) in Computer Science Samuele Pavone 2004

2 Modelling and recreating complex, natural flocking and predatory behaviour using a limited rule set. Submitted by Samuele Pavone Copyright Attention is drawn to the fact that copyright of this thesis rests with its author. The Intellectual Property Rights of the products produced as part of the project belong to the University of Bath (see This copy of the thesis has been supplied on condition that anyone who consults it is understood to recognise that its copyright rests with its author and that no quotation from the thesis and no information derived from it may be published without the prior written consent of the author. Declaration This dissertation is submitted to the University of Bath in accordance with the requirements of the degree of Batchelor of Science in the Department of Computer Science. No portion of the work in this dissertation has been submitted in support of an application for any other degree or qualification of this or any other university or institution of learning. Except where specifically acknowledged, it is the work of the author. This thesis may be made available for consultation within the University Library and may be photocopied or lent to other libraries for the purposes of consultation.

3 Abstract In nature, we have all witnessed large groups of birds flying in the sky, or a herd of sheep in a field; both are examples of flocking, a behaviour used in the animal kingdom for mutual protection from predators. In 1987 Craig Reynolds showed how flocking was an emergent behaviour derived from a small number of simple rules that governed behaviour. Reynolds work stipulates high level rules that can be implemented in a number of different ways. Starting from the original high level rules, an analysis and evaluation of contrasting implementation methods is produced. An implementation of the rules is designed and subsequently modified during coding. Work by Pocknell, Shultz and Vaughan adds solitary predators and shepherds to Reynolds model using a variety of different methods for governing predator behaviour. The different approaches are examined and a set of simple rules for predators is derived. Further suggestions are included about expanding the rule set so that co-ordinated predation between a group of predators appears more realistic. It is shown that while there is potential for predation to be simulated as emergent behaviour, it is not deemed viable or realistic without the addition of a more complex rule set involving the use of multiple predatory states.

4 Acknowledgements With heartfelt thanks to my family for the support shown and Dr Dan Richardson, for supervising my progress.

5 Contents 1 Introduction A gentle start Compelling factors Additional work Literature Survey Introduction Definitions Background information Representing and storing boids Basic flocking theory Forerunners to Reynolds Reynolds basics for flocks Obstacle avoidance techniques Steer away from surface Steer away from centre Curb Feeling Avoiding inter-flock collision Other means of collision avoidance Predation and Predator-Prey implementation techniques Using Finite State Machines Seek and Pursuit behaviours In summation Requirements analysis and specification Requirements elicitation What is a flock? Aggregation Further derived requirements Graphics and Graphical user interfaces Technology and Programming Test plan Project Design Explaining the development environment Programming language Design Methodology Implementing the boid simulation On the storage of boids Representing Direction: Vectors and Scalars The Five Class Boid Model Introduction and Background Object identification Intra-object communication Creating obstacles The Main Screen The two class boid model Differences and Alterations...30

6 4.5 Rule Implementation techniques Linear Boid Movement Non-linear Boid Movement: Static Obstacles Non-linear Boid Movement: Flock cohesion and avoidance Modelling Predation Predation techniques Simple Co-operation Proposing advanced behaviour System Testing...36 Testing the flocking behaviour Conclusions and Future Work Conclusions Reached A Critical Review Further Work Summation Bibliography...40

7 1 Introduction The classical definition of a flock is a group of objects that exhibit the general class of polarized, non-colliding, aggregate motion [reynolds87]. 1.1 A gentle start In nature, we have all witnessed large groups of birds in the sky, or shoals of fish swimming in the ocean. These are both examples of flocking, whereby a group of individual entities travel as one larger collective. Other examples of flocking include the movement of sheep while being rounded up and herd or herd like behaviour exhibited by Zebra, Wildebeest and the like. By extension, an accurate flocking simulation can be used as a tool for modelling natural behaviour within animals that herd or group. Examples of this can be seen in such films as Batman Returns (1992) and Disney s The Lion King. One can envision (controlled or directed) flock behaviour being useful in a military context, whereby offensive robot swarms can be used to create a large overwhelming attack, and also reduce dependency on one commander figure, providing flexibility and autonomy. Alternatively, on a more advanced level, it may be possible for a something similar to ant behaviour where a large group of small entities co-operate and perform a collective activity, which they would be unable to do individually (like carry something many times larger than themselves). 1.2 Compelling factors The main work of this project is to produce an accurate flock simulation from the rules that Reynolds initially proposed in his seminal paper on the subject. ([reynolds87]) In the paper he states that the rules that lead to flocking are: 1. Collision Avoidance: avoid collisions with nearby flockmates 2. Velocity Matching: attempt to match velocity with nearby flockmates 3. Flock Centring: attempt to stay close to nearby flockmates Some discussion is included within the paper as to what each of these rules entails however, no real elaboration is present as to how to implement the rules and what the optimum method would be. However, in his paper of the year after [reynold88] he does provide some collision avoidance methods. Obviously it is at the programmers discretion as to whether he uses them or not. Even so, Reynolds still leaves questions unanswered such as how close should the boid stay to flockmates? and what happens if a boid cannot avoid a flockmate? This gives the programmer a large amount of scope and a great deal of variables to manipulate. The effect of this is that if you view virtually any implementation of Reynolds flocking rules, each programmer will have had his own ideas as to how to best implement the rules using differing data structures and parameters. By following the same process and viewing how others have implemented their code, this 1

8 project shows a process of development and refinement that is used to arrive to a boid simulation, and the assumptions that have to be made. The attraction of this project lies in the underlying control that one has over the flock. By changing a small number of variables, one can radically alter the cohesion, bearing and other such properties of the flock, giving it different characteristics one can create a fast moving, aggressive flock or similarly, a placid, docile flock just as easily. Therefore, one can create both realistic flocks, yet also be in control of flocks that can be outlandish and improbable, but nonetheless have interesting properties. 1.3 Additional work Of further appeal is the possibilities for scope within the project; one can begin with a simple flock flying through empty space governed by a simple set of rules and then add further elements to the simulation. These can include obstacles for the flock to negotiate, the addition of a flock leader that can somehow govern flock movement, predator(s) who may threaten the flock (who may then themselves be working in a group) or the addition of a destination or goal for the flock to head to. One can also quite easily see where areas such as Artificial Life and AI can overlap within the subject. Of particular interest to me is the addition of predators to the boid model. Initial research shows that others (such as [pocknell99]) have successfully added solitary predators that use a simple rules set to hunt the boids, Naturally, some modification of the initial flocking rules is required to account for the extra obstacle that is the predator, however it is still within the spirit of the initial concept: that of complex emergent behaviour from a simple rules set. What interests me is whether it could be possible to have predation as emergent behaviour derived from a simple rules set. Existing work of a similar nature is in existence and can be used to gather ideas and as a basis. As an example, [ling03] experiments with shepherding behaviour whereby the objective is not to eat the boid but to move it towards a point or target. This however can be adapted and used to simulate the co-operation that predators use to manipulate the flock to single out a target. Within this paper is the discussion and ideas that could form the basis of emergent predatory behaviour. 2

9 2 Literature Survey 2.1 Introduction Definitions Flock A group of objects that exhibit (this) general class of polarized, non colliding, aggregate motion [Reynolds, 87] where polarized motion, in zoological terms refers to the (physical) alignment of an animal group. Boid A generic term first seen in [Reynolds, 87] for simulated bird-like birdoid objects that exhibits flocking behaviour and encompasses not only birds but also schools of fish and herds of animals Background information On initial inspection, a superficial view of the research area regarding flocks, herds and swarms seems to present the impression that all of what can be achieved within the field has been achieved at some level or another with further advances refining or providing alternative methods of improving the basics. The seminal work in this field is widely regarded as being Craig Reynolds 1987 paper Flocks, Herds, and Schools: A Distributed Behavioral Model [Reynolds, 87]. Within this paper, Reynolds lays down the basic concepts and ideas upon which much of the subsequent research is based. It is here that we first find use of the word boid that has become synonymous with flocking simulations since. Reynolds was to add to his initial paper a year later by publishing Not Bumping into Things, a collection notes on obstacle avoidance written for the course on Physically Based Modelling at SIGGRAPH88 [Reynolds, 88]. This paper refined and added detail to ideas and concepts that he had defined in his previous publication, allowing a greater realism to be portrayed in flocking simulations. Much of the work that now exists is based on Reynolds initial papers. One can see that the field has branched into various directions, one of the largest movements having driven towards different applications of Reynolds underlying concept. After collision avoidance had been tackled one could also see the possibility for other additions to the basic Reynolds model; these included predators and the existence of multiple flocks in the same environment. Indeed, Reynolds himself proposed possible uses of the models for simulating traffic flow or for modelling large crowds of people. In addition to the group of people that have added to Reynolds model, there is a group who have taken the basic model and then added their own, usually complex, structures on top to increase realism, provide greater simulation 3

10 accuracy or to shift the emphasis of the behaviour from the flocking to another area. Examples of such work include the use of smell explored in [Zhang, 97] or the framework proposed in [Sims, 94] for evolving different creatures with different attributes such as walking, flying or swimming speeds through further generations. Moving into the field of robotics, flocking ideas were modified and used to create ant army style collaborations whereby a group of robots working together produced greater results than that achievable by a single entity [Unsal, 93]. On a similar note, work by Balch and Arkin attempted to provide some order and formation to flocking, notably in [Balch, 98] with a possible eye towards military usage, or participation in the RoboCup Soccer tournament. From a slightly different perspective, [Reynolds, 87] notes that computationally 2 the flocking implementation proposed has a complexity of O ( N ) as each flock member must reason about every other flock member, even if only to decide to ignore it. He mentions two possible ways of reducing this, dynamic spatial partitioning and incremental collision detection Representing and storing boids In dynamic spatial partitioning the boids are sorted into a lattice of "bins" based on their position in space. It is analogous to the use of a hash table where each cell is an array to a doubly linked list of boids and XY or XYZ co-ordinates. This allows bin membership information to be changed in constant time as opposed to proportional to bin population. A boid trying to navigate inside the flock could get quick access to the flockmates that are physically nearby by examining the "bins" near its current position as opposed to examining each boid individually. An implementation of such a method is described in [Popovic, 94] originally (but referenced from [Reynolds, 00] where a locality query identifies which objects are within a certain radius and therefore require collision testing which is then handled by a separate method. [Pocknell, 99] extends this structure so that the density of the boids within each bin determines where the centre of the flock is and so affects steering behaviour in that way too. The advantage of the dynamic spatial partitioning is that because boids tend to keep a minimum distance from each other, the number of boids within a particular radius is bounded. Therefore, as [Reynolds, 00] notes, complexity is reduced to O( k. n) where k is the maximum density of boids within the radius tested. Essentially, as k is a constant, we can consider the true complexity to be asymptotically equivalent to O (n) making this method very efficient indeed. Incremental collision detection or x nearness testing which is based on a snapshot of current boid positions and is only updated as and when the boids 4

11 actually change position. This allows it to be updated faster and work more efficiently as long as the incremental changes are small. Further investigating the issue, it seems that dynamic spatial partitioning is the more widely used of the two techniques but, due to the large increases in computing power recently the need for efficiency appears to be less of an issue than in 1987 unless dealing with very large simulation, whereby efficiency becomes a significant factor. [Reynolds, 00] notes that in one test using a flying flock of 1000 simulated birds (versus about 300 in the Pigeons in the Park demo) performing locality queries with the bin-lattice spatial subdivision was about 16 times faster than the naive O( n 2 ) implementation. 2.2 Basic flocking theory From the above, one can see that the scope within the field is much larger than originally thought, in some cases encroaching other fields. For example, one can easily see how adding predators to the model can lead to discussing how predators hunt in nature, and then rule formulation that simulates that behaviour Forerunners to Reynolds In his 1987 paper, Reynolds attempts to provide a solution to the problem of animating realistic flocks of birds. From the above, the impression is given that the ideas and theories of flocking started with Reynolds and indeed, his work and the ideas presented within are used as a basis by a significant number of papers within the field. However, an alternative theory for producing flocking was available before [Reynolds, 87]. At SIGGRAPH 85, a short piece of work entitled Eurythmy was shown, with a flock of birds ascending a minaret, passing between columns. The technique used to make the animation was not specifically intended for flock modelling and remained unpublished but is noted in [Reynolds, 87] as being called "the force field animation system." Force fields are defined by a 3 x 3 matrix operator that transform from a point in space (where an object is located) to an acceleration vector: the birds trace paths along the "phase portrait" of the force field. There are "rejection forces" around each bird and around static objects. The force field associated with each object has a bounding box, so object interactions can be culled according to bounding box tests. An incremental, linear time algorithm finds bounding box intersections. The "animator" defines the space field(s) and sets the initial positions, orientations, and velocities of objects. The rest of the simulation is automatic. This precursor to Reynolds ideas, while remaining unpublished, is an alternative way of looking at the problem. However, as it was not primarily for use of flocking simulation, and similarly quite complex compared to later proposals, it has been largely forgotten and unused. An alternative method of flocking is proposed in [Brogan, 97] whereby the flocking behaviour is regulated based on the average distance from neighbours in 5

12 the flock. Indeed, [Blumberg, 95] and [Tu, 94] both describe alternative ways of controlling flock behaviour using a hierarchical control system that defines complex behaviour in terms of simpler ones. [Blumberg, 95] takes the view that each boid would in fact be an autonomous agent controlled by a five-layer model taking sensory information from its environment that it could then respond to using part of a set of motor functions that is has access to. Each motor function would be limited in what it could do but could be combined with other motor functions to produce more complex functions. [Helser, 98] mentions these alternatives but notes that while he believes that the model would provide a more stable motion for the flock it was difficult to integrate with Reynolds model for collision avoidance Reynolds basics for flocks Reynolds Flock Definition (Definitions 2.1.1) sets out criteria for what defines a flock in his view. Taking a purely conditional view, a flock is deemed to be such if its members are able to travel in the same direction (polarization) at roughly the same speed, staying within reasonable proximity of other members (aggregate motion) whilst simultaneously avoiding contact. However, aesthetically a realistic flock exhibits other, emergent behaviour such as the impression of centralised, intentional control and an overall fluid motion despite the fact the flock is made up of discrete bodies, only aware of their immediate neighbours. He notes that treating each object individually and then scripting each path for a large number of objects that would follow the above criteria is tedious. Given the complex paths that birds follow, it is doubtful this specification could be made without error It is unlikely that the constraints of flock motion could be maintained. [Reynolds, 87] Therefore, his propositions are that to produce realistic flocking, each member of the flock must obey the following three steering behaviours (in order of decreasing importance) which allows each boid to manoeuvre based on the positions and velocities of nearby flock mates: Collision Avoidance: avoid collisions with nearby flock mates (Separation) Velocity Matching: attempt to match velocity with nearby flock mates (Alignment) Flock Centring: attempt to stay close to nearby flock mates (Cohesion) 6

13 Obviously, one can see that the conflicting rules of separation and cohesion work together to both keep the flock together while simultaneously keeping its individual members from crashing into each other. The result is rather like a dampener effect with each boid, rather than keeping a fixed distance from each other member, closing up then moving away to other members depending on the direction taken. Velocity is measured as a vector rather than a scalar, allowing the heading of each bird to be changed as well as the speed at which it travels in that heading. Obviously, this can apply equally in both two and three dimensional space allowing vertical (height) movement of flocks in the air. Figure 2.1: A boids' area of influence By focusing solely on the local flock mates of a boid and basing its reaction to their movements, the basic simulation of a flock can be achieved. However, to make this work, a boid requires an area of influence round it that will limit what boids influence it. Modelling the area of influence on a birds vision provides us with workable results. The possibility of changing this area depending on the creature being simulated is then available. For now however, it suffices to have Reynolds initial model which is illustrated in figure 2.1. The angle is measured either side of the boids facing (denoted by the arrow) and a uniform distance of influence is kept as we go round the boid to the point of cut off. Naturally, were we to model in three dimensions, then the area of influence would extend both above and below the boid as well. A simple check could then work out whether another boid can be seen by the first boid. If we were to take a more complex approach to this, rather than a uniform field of vision, one can change the shape to emphasise the greater forward vision that the boid would have. This would elongate the circle of vision into an ellipse and would improve the realism of our results as now a boid would be able to see further ahead than at the sides. Obviously however, it is more complex to model this form of vision compared to the simpler method. In addition to the above, to help collision and obstacle avoidance, Reynolds proposes weighting the various responses that the boid receives depending on distance and the type of collision that will occur (whether boid boid or boid obstacle) allowing each input to be prioritised and thus to place greater or lesser emphasis on each of the flocking rules. 7

14 2.3 Obstacle avoidance techniques When taking into account the movement of a boid around an obstacle, it is of value to note that the path taken by a boid approaching an obstacle from (x,y) may differ depending on whether he is alone or within a flock. Figures 2.2 and 2.3 illustrate the difference that flocking can make. Figure 2.2: Blue boid and red boid are from separate flocks Figure 2.3: Blue boid and red boid are part of same flock In the second example, as the blue boid is in front of the red boid, it is affected by the sphere of influence of the obstacle first and so turns to avoid it. The response of the red boid is to start turning to match the alignment of the blue boid and then move towards the blue boid (as the distance between them has increased). This causes the obstacle to now be to the right of boid instead of to the left, causing the boid to turn left to avoid the obstacle. However, despite this, the flock may still split if some elements of it are too close to align themselves with the rest of the group. This often happens in large flocks that are quite widely spread out, where the boids do not turn with the rest of the flock as the obstacle is too near. Often, it is only the lead boids that are affected by the obstacle, [Crombie, 97] calls this feature The alignment effect and notes that by reacting to their environment the leading boids change the environment of following boids. In [Reynolds, 88], a number of different ways of implementing a collision avoidance system are proposed, some based on geometric models and some on image processing in addition to outlining a number of techniques that use artificial intelligence. Of these three categories, for the purposes of the project, the artificial intelligence implementations can be discarded, as they rely on such concepts as memory, learning and planning and are thus too complex for the scope of this project. It may be possible that a simple AI scheme is used for the predatory behaviour model, but it is more likely either to be a behavioural simulation (an artificial system with lifelike properties) or a simple set of rules governing behaviour rather than proper artificial intelligence. Both the other two categories (geometric based collision avoidance models and image processing based models) are heuristic in nature and involve no real 8

15 rational thinking. The image processing models get their information from viewing the environment as an image. If they were to be implemented, one would have to take into account (and calculate) a boids eye view at every step of the way, for every boid. This technique is incompatible if used with the basic implementation technique described above as it relies on a three dimensional view being projected and calculated. As the simulation will be limited to two dimensions it is understandable to disregard this category of methods as well. It is clear then, that we should use a geometric based model to go with our geometric based simulation. The scope is there to adapt an AI style behavioural simulation at a later date, time permitting. [Reynolds, 88] proposes four alternative methods for collision avoidance of which three are detailed below. The final method described by Reynolds, silhouette avoidance, is another based on taking a boids eye view of things. It is similar in nature to the curb feeling method described below, but requires us to work in three dimensions, and so is more akin to an image processing method similar to the ones described above. Due to the relative complexity of this model it is judged that this method could be introduced within the simulation at a later date should there be time remaining, but that one of the other methods described below would be better suited, at least to begin with. The methods described below are described at a high level; within the design of the project, it is discussed the best way to represent the repelling and attracting forces described in the simulation. In addition to Reynolds methods, a slightly more specific method for avoiding collisions between two moving objects, as used in [Pocknell, 99], is also discussed below as an alternative implementation. Most of the methods described below are primarily used for avoidance of static object but can, with some alteration be used with obstacles in motion. 9

16 2.3.1 Steer away from surface Intuitive path around obstacle Wall (Obstacle) Repelling force Actual Path taken. Repelling force exactly opposite to boid velocity Boid Figure 2.4: Effect of approaching an obstacle square on Also known as the force field effect, this presumes that the surface of the obstacle has a strong repellent force and that the obstacle is stationary and immobile. The object approaching the obstacle is repelled away from the obstacle by a force whose strength is inversely related to the distance to the object. The advantage of this method is that often the repelling force can be modelled using one equation and so calculated easily, and quickly. Unfortunately, this method does not always produce movement that can be deemed steering round an object. If the obstacle is being approached square on, for example a wall, the repelling motion is directed directly away from the direction of motion of the object, eventually exactly opposing the velocity of the object, bringing it to a stop. Figure 2.5: Graph of lateral movement compared to horizontal offset 10

17 The reason this happens is because this technique relies on setting the amount of lateral movement depending on the horizontal offset to the obstacle. If we are to graph the function then the result in Figure 2.5 is achieved. One can immediately see the dead zone at the centre of the graph that is the equivalent to the object being approached square on. Additionally, another problem with the force field method is that it is not directionally discriminatory; this means that an obstacle affects object movement even though the obstacle may not be in the path of the object. The result of this is that the boid steers away from the object even if it is flying parallel to it. In order to rectify this, we need to impose a number of different weightings that cause an exaggeration of the curve seen in Figure 2.5. These weightings must be based on the angle of intersection (if any) that the obstacle and boid create. Obviously, no intersection will result in no repelling force. Without these adjustments, the effect of the repulsion is far too strong when flying alongside an obstacle, and far too weak when flying towards one. The result of these changes are that objects are far more sensitive to obstacles directly in front of them, causing them to turn earlier to avoid them, resulting in a more aesthetically pleasing and realistic avoidance. 11

18 2.3.2 Steer away from centre Example path taken around obstacle Intuitive path around obstacle Wall (Obstacle) Repelling force around centre of wall Boid Figure 2.6: Boid negotiating obstacle using Steer from Centre technique This technique considers the obstacle to be a point rather than a plane or geometric shape. The dead spot encountered in the previous method is removed by reducing the obstacle to a point; if we are to the left of centre then we steer to the left, if we are above then we steer upwards. One can visualise this as a spherical force field based around a point and model it as such. This causes a boid wishing to traverse the obstacle to exhibit uniform lateral acceleration which in general proves to be better than the technique described above. As a refinement one can, as above, make the repulsion force inversely proportional to the distance from the centre producing a more realistic obstacle negotiation effect. In addition, it is easier to calculate intersection of the force field with a boid than in the previous technique, as only the centre of the obstacle needs to be stored. In order to allow some directional discrimination, one can bind the radius of influence that the obstacle has and any object outside that radius can remain unaffected. In a further refinement, the sphere of influence can be stretched into ellipses easily by editing a small part of the equation, thus allowing a more accurate covering of shapes such as walls and thus, a more realistic negotiation. This method is similar to the method used in [Pocknell, 99] for collision avoidance between moving objects. 12

19 2.3.3 Curb Feeling Feeler deflected down to edge of obstacle Feeler New Feeler gives direction to take to avoid collision Boid Figure 2.7: Curb Feeler technique This technique takes a different approach to the above. Rather than being obstacle orientated, it is boid orientated but at the same time, it is possible to combine either of the above techniques with this method. The basics of the method require that each boid is equipped with a feeler, a probe that extends along the axis of each boid in the direction of travel. When the probe intersects an obstacle (or area of repulsion such as one above) it is pushed to the edge of the obstacle. This movement provides the boid with a directional vector, a direction to take to avoid the object for now. Obviously, if the feeler intersects the object again, then the process is repeated, and so the boid has to change heading yet again until the feeler no longer intersects with the object. The length of the probe is governed by how quickly the boid is moving. A fast moving boid will have a longer probe than a slow moving boid and so each probe length will be dynamically altered as the bird speeds up or slows down. In addition, one can multiply the length of the probe by a factor that Reynolds calls predictiveness. The predictiveness factor determines how much time prior to a potential collision is allocated to steering away from the obstacle [Reynolds, 88] and using this we can individualise certain boids so that some will fly nearer the obstacle before turning away whereas others will be more cautious. In addition, one can check by how much the probe has been displaced and then change the velocity of the boid by the same amount, thus giving us the next probe length. The combination of the above provides a greater realism to the flock as there is a greater variety of movement within the individual members. As with the methods above, the curb feeler is best suited to when the obstacle to be traversed is static however, unlike the steer away from surface method, it is possible to be able to implement this model to avoid collision between two moving obstacles as well. In addition, it allows a more accurate representation of obstacles that may be irregularly shaped, thereby allowing more a complex environment to be created. 13

20 2.3.4 Avoiding inter-flock collision Direction of facing Greater priority given to intersections occurring in spheres nearer boid Figure 2.8: Phil Pocknells' "Sphere of influence" model [Pocknell, 99] [Reynolds, 87] makes no mention of multiple flocks. If more than one flock appears in space then they are all part of the same flock that have not been attracted to each other and joined together yet. In [Crombie, 97], there are multiple, separate flocks that do not wish to flock together (one can visualise this as different species perhaps) and so repel each other. They are implemented using the steer away from centre technique described above, treating the rival boid as an object to avoid and thus be repelled from, at the same time as the other boid is doing the same. The avoidance behaviour used whilst satisfactory does not, to me, seem to be very realistic, causing whole flocks to swerve to avoid one or two boids, whereas in reality, such a large swerve would be more akin to a scenario such as a cat jumping into the midst of a large group of birds. It is possible that it could be put to use, and better suited for a predator-prey scenario rather than flock avoidance. An alternative method to use is from [Pocknell, 99] who takes inspiration from [Brooks, 89] where the robot Allen uses sonar distance sensors to avoid both static obstacles and dynamic obstacles such as boids. Pocknell proposes using the vector sum of the repulsive forces to tell each boid what action they should take. In this way, as soon as potential collision is detected, each boid starts to turn away. This has the advantage of taking into account the relative speeds of the two boids, causing fast boids to turn less than slower moving boids. It is then a case of moving the simulation forward one step and, if collision is still imminent, recalculating the vectors again. Pocknell notes that an emergent behaviour of using vector calculation is when a lone tadpoid (boid) heads at a perpendicular 14

21 angle towards a large group. The individual tadpoid just swoops right along with the group. In this respect at least, this emergent behaviour is welcome. The detection method described by Pocknell is very similar in concept to the curb feeler method. In his version, each boid has a feeler of identical length, and a cone of perception pointing the way the boid is facing. The cone is split into three sections to represent how close to the boid the potential collision is. Each area is allocated a certain priority which determines how quickly the boid speeds up or slows down to avoid collision as well as how much to turn. However, Pocknells method does not work very well when it comes to static object detection, as a static object does not have a velocity vector and so erroneous results would be produced were the above method to be used. To circumvent this Pocknell uses a simple rules table to allow his boids to navigate the confined environment in which they inhabit. He labels each wall in his environment and works out the angle of potential collision and then uses a combination of these two factors to explicitly instruct the boid to either turn left or right. While this method is less satisfying than the more autonomous methods described above, it does serve a purpose, especially if the boids are confined to within an environment like the confines of a screen where they may have a corner that they could get stuck in Other means of collision avoidance As part of a 3 layer system similar to the one in [Blumberg, 95], [Reynolds, 99] proposes an alternative system of path determination based on a number of simple common steering behaviours that can be combined into more complex ones. However, Reynolds notes that this system is primarily for use for fast motion ; when the typical velocity of a character (object) is large relative to its maximum turning acceleration as without limiting changes of orientation it allows manoeuvres that appear unrealistic if the object is at a lower speed. Reynolds proposes a large set of behaviours with such titles as seek, pursuit and evasion and an additional locomotion level for implementing the movement associated with the behaviours; these can be viewed as an extension and generalisation of his flocking work but one that can also be used to model other behaviour, such as predation. The locomotion model used is a point mass approximation and therefore does not take into account inertia but is however computationally cheap. Each object within the model has a mass, position vector, velocity vector, and two other scalar values; one for maximum speed and one called max thrust. Additionally, each object also has a vector storing its orientation (and heading). At each simulation step, steering forces (as determined by the active behaviour and limited by the max thrust) are applied to the mass of the object. This results in an acceleration that can then be used to modify the velocity of the object and thus produce the resultant velocity that is used to calculate the objects new position. 15

22 Of the steering behaviours proposed, the ones that are directly interesting to us are undoubtedly the separation, cohesion, alignment and flocking behaviours. However other proposed behaviours by Reynolds are certainly worth investigating further and possibly implementing within the simulation. Behaviours such as pursuit and offset pursuit would enable predators to track their prey from a safe distance. However, some work would still be necessary to enable the predators to work co-operatively, perhaps by slightly modifying other behaviours to suit our purposes. The behaviours outlined above and other discussions can be found in the following section: Predation and predator-prey implementation techniques. 16

23 2.4 Predation and Predator-Prey implementation techniques As mentioned before, there is a large amount of scope within the field of flocking for variation as to what to focus on. Having seen what has been done, the ideal solution would be to implement a predator-prey system whereby a flock, or possibly a number of flocks are hunted by one or more predators. It is important to note that the word predator does not necessarily solely imply that the prey are to be chased and eaten, but should imply that the predator is perceived as a threat by the prey who will take steps to avoid the predator as much as possible. This therefore includes shepherding scenarios involving sheep and sheepdogs. One can view the predation process as a game of tag between predator and prey. [Reynolds, 94] describes theories and strategies behind playing tag based on a one-on-one competition between autonomous agents but notes that it is primarily used to study the use competitive fitness and mentions that this work is not about optimal control theory. Regardless, it is worthwhile as different evasion strategies are mentioned and various stimulus diagrams are produced showing optimal turning angles; these could be used at a later date if a more advanced AIlike model is used to govern behaviour. If we return to [Pocknell, 99], his simulation involves the use of a solitary predatory whose predation strategy is similar to his collision approach; By using [Brooks, 89] as his basis, he defines that each predator has a sphere of influence based on how fast it is moving. A slow moving predator does not pose much of a threat and so has a smaller sphere of influence compared to a fast moving predator, in the same way a slow moving boid has a shorter feeler in the curb feeling method. A boid entering the sphere of influence of the predator (or vice versa) is diverted and repelled from its path by the predator, much like the scattering of a herd. Pocknell implements the predator method so that rather than completely avoiding the predator, if a lone boid is trying to join the rest of the flock it will try and avoid the predator by arcing it s path so it moves further away from the predator but still towards it s target. This seems to be more realistic as one often sees in nature herd stragglers instinctively trying to rejoin by use of a longer route, if only for the protection a herd offers instead of being left to face a hungry predator. In [Pocknell, 99] the predator is controlled by the user whereas in the game of tag implemented in [Helser, 94] the it boid uses a hunt-the-nearest approach in choosing and then pursuing a target. Implementing the Pocknell technique requires additions to be made to the basic simulation. Each boid would have an ideal target spot that they would like to go to, usually somewhere in the middle of the herd. However, if an obstacle or predator were to obstruct the way to that spot, the boid, instead of being repelled, would have to keep the same target and try and jink round the object or predator. Obviously, were the target to move, or predator to move then the boid would have to re-evaluate its options. For an application such as this, then one could possibly apply the strategies discussed in Reynolds tag game. 17

24 Ideally one would like to be able to model a real-life hunting strategy for either a single animal or hunting pack based on real natural behaviour. One can take hunting strategies such as those employed by a pride of lions and break them down into simpler sub rules following the guidelines published in [Blumberg, 95] for use to implement a lion-like predation system. Similarly, using similar work again one can develop counter strategies. Unfortunately, it is far too easy for one to get carried away with programming strategy and counter-strategy; in order to keep the project feasible the rules governing predation must be kept as simple as possible Using Finite State Machines A possible implementation strategy can be derived from ideas set out in [Reynolds, 00]. In this paper, rather than the prey following simple behaviour rules slavishly, they are modelled as finite state machines with differing behaviour depending on which state they are in. Reynolds uses the example of a pigeon in the park and defines it in its simplest form as having two states: walk and fly. Its default state is walk, but if it is startled then it will change its state to fly which changes the restrictions placed on the pigeon. For example, if the pigeon is in the fly state, it no longer has to remain on the ground when moving but can instead take to the air. Additionally, it can have a higher top speed than in the walking state as it can fly faster than it can walk. Reynolds also adds the concept of an abstract factor that influences future behaviour. In his simulation, he adds an annoyance level that influences how far the pigeon will fly away if it is startled. The annoyance factor is increased every time the pigeon is disturbed and decreases slowly over time. As well as the pigeon changing state, Reynolds also introduces the concept of contagiousness whereby the effect of an abnormal (non default) action (in this case, flying away) can influence the states of birds which are nearby, causing them to take too. As a result, if a single bird in a dense crowd is scared and starts flying away, other birds may react to the fact that he is flying away and do the same. As more birds fly away, so the chance of other birds doing the same is increased. This could be used in a flock so that if one boid is startled by a predator and starts to take evasive action, this will cause the rest of the flock to follow suit Seek and Pursuit behaviours The following behaviours are defined in [Reynolds, 99] and are reproduced here as I believe they are of use in helping to mimic predatory behaviour. Seek Seek is the pursuit of a static target. Essentially, the behaviour acts to steer the object towards a specified target point by adjusting the velocity of the object so that it is aligned towards the target. This behaviour however, does not cause the object to slow down or stop once it reaches its target and so once the object has overshot the target the behaviour will cause the object to loop round and approach the target again. 18

25 Pursuit Pursuit is similar to seek except that the target is moving. Essentially, it involves prediction of where the target will end up and then seek towards that point. A linear velocity-based predictor can be used to work out a target point. This assumes that the quarry will not turn during the prediction interval. While this is unrealistic, it is of use as the resulting prediction will only be in use for a short amount of time. Using this method we can predict the location of an object after T moves by simple vector arithmetic and use this as our target. However, Reynolds proposes that T should be proportional to distance from our quarry; the closer we are to our prey the smaller T should be and the less in advance we should predict. Additionally, we can increase the sophistication of this model by taking into account relative headings of pursuer and prey. Offset pursuit behaviour is similar to normal pursuit behaviour but is more analogous to a strafing run. In our boid simulation it could be used to stalk prey and allow the predator to get into a better position by just staying far enough away so as not to panic the prey In summation Overall, I believe that an optimal solution to mimicking predatory behaviour within the simulation would be to combine the ideas proposed in [Reynolds, 99] and [Reynolds, 00]. While discussed further in the design, that basis for a predator would have a hunt state and a pounce state that it enters once it has chosen a target. Additional rules would have to be added to each state to ensure that multiple predators would choose the same target and then attempt to corner it cooperatively. Initially, while a simple boid simulation (as set out in [Reynolds, 87]) would suffice the scope could easily be extended to add the finite state machine idea at a later date. 19

26 3 Requirements analysis and specification The initial aim of this project is to create a flocking simulation based on Chris Reynolds work on flocks and boids as outlined in [Reynolds, 87]. Deriving requirements from this paper, we can then define what a flock is and the properties of a flock. The simulation should then exhibit the properties defined in order to be seen as successful. 3.1 Requirements elicitation The basic implementation is a relatively simple and open project, with few requirements of note. Most derived requirements are definitions of behaviour (such as what constitutes flocking? ) and the accompanying test for checking that the requirement is fulfilled. Additional requirements would therefore mostly be self imposed, depending on the additional feature that was to be implemented. 3.2 What is a flock? As discussed in the previous section, [Reynolds, 87] defines a flock as A group of objects that exhibit (this) general class of polarized, non colliding, aggregate motion. From that sentence it is possible to derive the initial 3 requirements that our flock must stick to. Essentially, each of the 3 requirements is linked to one of the rules of flocking proposed by Reynolds. We can view the requirements as a test to see whether we have correctly implemented Reynolds rules; should the behaviour not be present, then that particular rule is not being adhered to Polarization Polarization, or in this case polarized motion, refers to the collective group movement of the flock that gives the impression of it being under centralised control. If one is to link the behaviour to a rule, then it is best described as the direct result of velocity matching, where the heading and speed of nearby boids is kept at more or less similar levels. We can test this condition simply if we implement the simulation graphically; If the condition is being fulfilled, the boids will be seen to be lining up and heading in a similar direction at a similar speed, thereby more or less keeping a constant distance between each boid member; naturally, this behaviour may change should an obstacle be introduced Non-collision Strictly speaking, the ideal boid simulation would ensure that no collisions between entities are possible. However, if one wishes to create a realistic simulation, then one must accept the view that in real life collisions do occur. Generally, collisions occur because of a misjudgement of distance or speed. In our simulation, it is entirely feasible that a boid may veer into the path of another boid and thus give the first boid enough time to react and change course quickly enough. If we were to strictly implement this rule then the avoidance behaviour 20

Traffic/Flocking/Crowd AI. Gregory Miranda

Traffic/Flocking/Crowd AI. Gregory Miranda Traffic/Flocking/Crowd AI Gregory Miranda Introduction What is Flocking? Coordinated animal motion such as bird flocks and fish schools Initially described by Craig Reynolds Created boids in 1986, generic

More information

Under the Guidance of

Under the Guidance of Presented by Linga Venkatesh (10305085) Deepak Jayanth (10305913) Under the Guidance of Prof. Parag Chaudhuri Flocking/Swarming/Schooling Nature Phenomenon Collective Behaviour by animals of same size

More information

Particle Systems. Typical Time Step. Particle Generation. Controlling Groups of Objects: Particle Systems. Flocks and Schools

Particle Systems. Typical Time Step. Particle Generation. Controlling Groups of Objects: Particle Systems. Flocks and Schools Particle Systems Controlling Groups of Objects: Particle Systems Flocks and Schools A complex, fuzzy system represented by a large collection of individual elements. Each element has simple behavior and

More information

NUMB3RS Activity: Follow the Flock. Episode: In Plain Sight

NUMB3RS Activity: Follow the Flock. Episode: In Plain Sight Teacher Page 1 NUMB3RS Activity: Follow the Flock Topic: Introduction to Flock Behavior Grade Level: 8-12 Objective: Use a mathematical model to simulate an aspect of birds flying in a flock Time: 30 minutes

More information

Graphs, Search, Pathfinding (behavior involving where to go) Steering, Flocking, Formations (behavior involving how to go)

Graphs, Search, Pathfinding (behavior involving where to go) Steering, Flocking, Formations (behavior involving how to go) Graphs, Search, Pathfinding (behavior involving where to go) Steering, Flocking, Formations (behavior involving how to go) Class N-2 1. What are some benefits of path networks? 2. Cons of path networks?

More information

Hierarchical Impostors for the Flocking Algorithm in 3D

Hierarchical Impostors for the Flocking Algorithm in 3D Volume 21 (2002), number 4 pp. 723 731 COMPUTER GRAPHICS forum Hierarchical Impostors for the Flocking Algorithm in 3D Noel O Hara Fruition Technologies Ltd, Dublin, Ireland Abstract The availability of

More information

Swarm Intelligence Particle Swarm Optimization. Erick Luerken 13.Feb.2006 CS 790R, University of Nevada, Reno

Swarm Intelligence Particle Swarm Optimization. Erick Luerken 13.Feb.2006 CS 790R, University of Nevada, Reno Swarm Intelligence Particle Swarm Optimization Erick Luerken 13.Feb.2006 CS 790R, University of Nevada, Reno Motivation Discuss assigned literature in terms of complexity leading to actual applications

More information

12 - More Steering. from Milligan, "Artificial Intelligence for Games", Morgan Kaufman, 2006

12 - More Steering. from Milligan, Artificial Intelligence for Games, Morgan Kaufman, 2006 12 - More Steering from Milligan, "Artificial Intelligence for Games", Morgan Kaufman, 2006 Separation commonly used in crowds, when all characters moving in roughly the same direction (repulsion steering)

More information

Crowd simulation. Taku Komura

Crowd simulation. Taku Komura Crowd simulation Taku Komura Animating Crowds We have been going through methods to simulate individual characters What if we want to simulate the movement of crowds? Pedestrians in the streets Flock of

More information

CS 378: Computer Game Technology

CS 378: Computer Game Technology CS 378: Computer Game Technology Dynamic Path Planning, Flocking Spring 2012 University of Texas at Austin CS 378 Game Technology Don Fussell Dynamic Path Planning! What happens when the environment changes

More information

Collision Avoidance with Unity3d

Collision Avoidance with Unity3d Collision Avoidance with Unity3d Jassiem Ifill September 12, 2013 Abstract The primary goal of the research presented in this paper is to achieve natural crowd simulation and collision avoidance within

More information

The Chase Problem (Part 1) David C. Arney

The Chase Problem (Part 1) David C. Arney The Chase Problem (Part 1) David C. Arney We build systems like the Wright brothers built airplanes build the whole thing, push it off a cliff, let it crash, and start all over again. --- R. M. Graham

More information

11 Behavioural Animation. Chapter 11. Behavioural Animation. Department of Computer Science and Engineering 11-1

11 Behavioural Animation. Chapter 11. Behavioural Animation. Department of Computer Science and Engineering 11-1 Chapter 11 Behavioural Animation 11-1 Behavioral Animation Knowing the environment Aggregate behavior Primitive behavior Intelligent behavior Crowd management 11-2 Behavioral Animation 11-3 Knowing the

More information

Simulation: Particle Systems

Simulation: Particle Systems Simulation: Particle Systems Course web page: http://goo.gl/eb3aa February 28, 2012 Lecture 5 Particle Systems Definition: Simulation of a set of similar, moving agents in a larger environment Scale usually

More information

Sketch-based Interface for Crowd Animation

Sketch-based Interface for Crowd Animation Sketch-based Interface for Crowd Animation Masaki Oshita 1, Yusuke Ogiwara 1 1 Kyushu Institute of Technology 680-4 Kawazu, Iizuka, Fukuoka, 820-8502, Japan oshita@ces.kyutech.ac.p ogiwara@cg.ces.kyutech.ac.p

More information

Master s Thesis. Animal Stampede Simulation

Master s Thesis. Animal Stampede Simulation Master s Thesis Animal Stampede Simulation Akila Lakshminarayanan Brian Tran MSc Computer Animation and Visual Effects, NCCA 2011-2012 Abstract Large crowd scenes with humans and animals are abundant in

More information

Chapter 3 Implementing Simulations as Individual-Based Models

Chapter 3 Implementing Simulations as Individual-Based Models 24 Chapter 3 Implementing Simulations as Individual-Based Models In order to develop models of such individual behavior and social interaction to understand the complex of an urban environment, we need

More information

Real-time Crowd Movement On Large Scale Terrains

Real-time Crowd Movement On Large Scale Terrains Real-time Crowd Movement On Large Scale Terrains Wen Tang, Tao Ruan Wan* and Sanket Patel School of Computing and Mathematics, University of Teesside, Middlesbrough, United Kingdom E-mail: w.tang@tees.ac.uk

More information

Founda'ons of Game AI

Founda'ons of Game AI Founda'ons of Game AI Level 3 Basic Movement Prof Alexiei Dingli 2D Movement 2D Movement 2D Movement 2D Movement 2D Movement Movement Character considered as a point 3 Axis (x,y,z) Y (Up) Z X Character

More information

SheepLog: Creating a Prolog framework to herd sheep

SheepLog: Creating a Prolog framework to herd sheep Bachelor thesis Artificial Intelligence Radboud University SheepLog: Creating a Prolog framework to herd sheep Author: Frank Dorssers s0824704) frank.dorssers@gmail.com Supervisor/assessor: Dr. ir. Martijn

More information

CS 387/680: GAME AI MOVEMENT

CS 387/680: GAME AI MOVEMENT CS 387/680: GAME AI MOVEMENT 4/5/2016 Instructor: Santiago Ontañón santi@cs.drexel.edu Class website: https://www.cs.drexel.edu/~santi/teaching/2016/cs387/intro.html Reminders Check Blackboard site for

More information

Elastic Bands: Connecting Path Planning and Control

Elastic Bands: Connecting Path Planning and Control Elastic Bands: Connecting Path Planning and Control Sean Quinlan and Oussama Khatib Robotics Laboratory Computer Science Department Stanford University Abstract Elastic bands are proposed as the basis

More information

Artificial Intelligence Prof. Deepak Khemani Department of Computer Science and Engineering Indian Institute of Technology, Madras

Artificial Intelligence Prof. Deepak Khemani Department of Computer Science and Engineering Indian Institute of Technology, Madras Artificial Intelligence Prof. Deepak Khemani Department of Computer Science and Engineering Indian Institute of Technology, Madras (Refer Slide Time: 00:17) Lecture No - 10 Hill Climbing So, we were looking

More information

ENHANCING THE CONTROL AND PERFORMANCE OF PARTICLE SYSTEMS THROUGH THE USE OF LOCAL ENVIRONMENTS. Abstract

ENHANCING THE CONTROL AND PERFORMANCE OF PARTICLE SYSTEMS THROUGH THE USE OF LOCAL ENVIRONMENTS. Abstract ENHANCING THE CONTROL AND PERFORMANCE OF PARTICLE SYSTEMS THROUGH THE USE OF LOCAL ENVIRONMENTS Daniel O. Kutz Richard R. Eckert State University of New York at Binghamton Binghamton, NY 13902 Abstract

More information

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a

The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a The goal is the definition of points with numbers and primitives with equations or functions. The definition of points with numbers requires a coordinate system and then the measuring of the point with

More information

LECTURE 16: SWARM INTELLIGENCE 2 / PARTICLE SWARM OPTIMIZATION 2

LECTURE 16: SWARM INTELLIGENCE 2 / PARTICLE SWARM OPTIMIZATION 2 15-382 COLLECTIVE INTELLIGENCE - S18 LECTURE 16: SWARM INTELLIGENCE 2 / PARTICLE SWARM OPTIMIZATION 2 INSTRUCTOR: GIANNI A. DI CARO BACKGROUND: REYNOLDS BOIDS Reynolds created a model of coordinated animal

More information

CS 231. Crowd Simulation. Outline. Introduction to Crowd Simulation. Flocking Social Forces 2D Cellular Automaton Continuum Crowds

CS 231. Crowd Simulation. Outline. Introduction to Crowd Simulation. Flocking Social Forces 2D Cellular Automaton Continuum Crowds CS 231 Crowd Simulation Outline Introduction to Crowd Simulation Fields of Study & Applications Visualization vs. Realism Microscopic vs. Macroscopic Flocking Social Forces 2D Cellular Automaton Continuum

More information

When using Flocking with network rendering (LWSN, for instance) you must bake your Flocking results.

When using Flocking with network rendering (LWSN, for instance) you must bake your Flocking results. Flocking About Flocking LightWave s flocking system is based on 3D computer models of coordinated animal motion, things like flocks of birds, herds of animals or schools of fish. It can be used with LightWave

More information

Images from 3D Creative Magazine. 3D Modelling Systems

Images from 3D Creative Magazine. 3D Modelling Systems Images from 3D Creative Magazine 3D Modelling Systems Contents Reference & Accuracy 3D Primitives Transforms Move (Translate) Rotate Scale Mirror Align 3D Booleans Deforms Bend Taper Skew Twist Squash

More information

Efficient Crowd Simulation for Mobile Games

Efficient Crowd Simulation for Mobile Games 24 Efficient Crowd Simulation for Mobile Games Graham Pentheny 24.1 Introduction 24.2 Grid 24.3 Flow Field 24.4 Generating the Flow Field 24.5 Units 24.6 Adjusting Unit Movement Values 24.7 Mobile Limitations

More information

Fast Local Planner for Autonomous Helicopter

Fast Local Planner for Autonomous Helicopter Fast Local Planner for Autonomous Helicopter Alexander Washburn talexan@seas.upenn.edu Faculty advisor: Maxim Likhachev April 22, 2008 Abstract: One challenge of autonomous flight is creating a system

More information

Robotic Behaviors. Potential Field Methods

Robotic Behaviors. Potential Field Methods Robotic Behaviors Potential field techniques - trajectory generation - closed feedback-loop control Design of variety of behaviors - motivated by potential field based approach steering behaviors Closed

More information

Stability Analysis of M-Dimensional Asynchronous Swarms With a Fixed Communication Topology

Stability Analysis of M-Dimensional Asynchronous Swarms With a Fixed Communication Topology 76 IEEE TRANSACTIONS ON AUTOMATIC CONTROL, VOL. 48, NO. 1, JANUARY 2003 Stability Analysis of M-Dimensional Asynchronous Swarms With a Fixed Communication Topology Yang Liu, Member, IEEE, Kevin M. Passino,

More information

BSc Computing Year 3 Graphics Programming 3D Maze Room Assignment Two. by Richard M. Mann:

BSc Computing Year 3 Graphics Programming 3D Maze Room Assignment Two. by Richard M. Mann: BSc Computing Year 3 Graphics Programming 3D Maze Room Assignment Two by Richard M. Mann: 20032144 April 2003 Table of Contents 1 INTRODUCTION...4 2 ANALYSIS & DESIGN...5 2.1 ROOM DESIGN... 5 2.1.1 Dimensions...5

More information

CS 354 R Game Technology

CS 354 R Game Technology CS 354 R Game Technology Particles and Flocking Behavior Fall 2017 Particle Effects 2 General Particle Systems Objects are considered point masses with orientation Simple rules control how the particles

More information

PARTICLE SWARM OPTIMIZATION (PSO)

PARTICLE SWARM OPTIMIZATION (PSO) PARTICLE SWARM OPTIMIZATION (PSO) J. Kennedy and R. Eberhart, Particle Swarm Optimization. Proceedings of the Fourth IEEE Int. Conference on Neural Networks, 1995. A population based optimization technique

More information

REINFORCEMENT LEARNING: MDP APPLIED TO AUTONOMOUS NAVIGATION

REINFORCEMENT LEARNING: MDP APPLIED TO AUTONOMOUS NAVIGATION REINFORCEMENT LEARNING: MDP APPLIED TO AUTONOMOUS NAVIGATION ABSTRACT Mark A. Mueller Georgia Institute of Technology, Computer Science, Atlanta, GA USA The problem of autonomous vehicle navigation between

More information

Interactive Scientific Visualization of Polygonal Knots

Interactive Scientific Visualization of Polygonal Knots Interactive Scientific Visualization of Polygonal Knots Abstract Dr. Kenny Hunt Computer Science Department The University of Wisconsin La Crosse hunt@mail.uwlax.edu Eric Lunde Computer Science Department

More information

Chapter 5. Transforming Shapes

Chapter 5. Transforming Shapes Chapter 5 Transforming Shapes It is difficult to walk through daily life without being able to see geometric transformations in your surroundings. Notice how the leaves of plants, for example, are almost

More information

Intersection Acceleration

Intersection Acceleration Advanced Computer Graphics Intersection Acceleration Matthias Teschner Computer Science Department University of Freiburg Outline introduction bounding volume hierarchies uniform grids kd-trees octrees

More information

Adaptive Robotics - Final Report Extending Q-Learning to Infinite Spaces

Adaptive Robotics - Final Report Extending Q-Learning to Infinite Spaces Adaptive Robotics - Final Report Extending Q-Learning to Infinite Spaces Eric Christiansen Michael Gorbach May 13, 2008 Abstract One of the drawbacks of standard reinforcement learning techniques is that

More information

Lesson 1: Introduction to Pro/MECHANICA Motion

Lesson 1: Introduction to Pro/MECHANICA Motion Lesson 1: Introduction to Pro/MECHANICA Motion 1.1 Overview of the Lesson The purpose of this lesson is to provide you with a brief overview of Pro/MECHANICA Motion, also called Motion in this book. Motion

More information

Decimals should be spoken digit by digit eg 0.34 is Zero (or nought) point three four (NOT thirty four).

Decimals should be spoken digit by digit eg 0.34 is Zero (or nought) point three four (NOT thirty four). Numeracy Essentials Section 1 Number Skills Reading and writing numbers All numbers should be written correctly. Most pupils are able to read, write and say numbers up to a thousand, but often have difficulty

More information

NCCA National Center for Computer Animation Master Project ZHUO YAO LU. MSC Computer Animation. Media School. Bournemouth University NCCA 2005

NCCA National Center for Computer Animation Master Project ZHUO YAO LU. MSC Computer Animation. Media School. Bournemouth University NCCA 2005 Master Project ZHUO YAO LU MSC Computer Animation Media School Bournemouth University NCCA 2005-1 - MSC Computer Animation Contents Part 1 Flocking System in Maya Mel Script 5 Chapter 1 Introduction 6

More information

Complex behavior emergent from simpler ones

Complex behavior emergent from simpler ones Reactive Paradigm: Basics Based on ethology Vertical decomposition, as opposed to horizontal decomposition of hierarchical model Primitive behaviors at bottom Higher behaviors at top Each layer has independent

More information

Geometric Entities for Pilot3D. Copyright 2001 by New Wave Systems, Inc. All Rights Reserved

Geometric Entities for Pilot3D. Copyright 2001 by New Wave Systems, Inc. All Rights Reserved Geometric Entities for Pilot3D Copyright 2001 by New Wave Systems, Inc. All Rights Reserved Introduction on Geometric Entities for Pilot3D The best way to develop a good understanding of any Computer-Aided

More information

CONTRIBUTION TO THE INVESTIGATION OF STOPPING SIGHT DISTANCE IN THREE-DIMENSIONAL SPACE

CONTRIBUTION TO THE INVESTIGATION OF STOPPING SIGHT DISTANCE IN THREE-DIMENSIONAL SPACE National Technical University of Athens School of Civil Engineering Department of Transportation Planning and Engineering Doctoral Dissertation CONTRIBUTION TO THE INVESTIGATION OF STOPPING SIGHT DISTANCE

More information

ADAPTIVE TILE CODING METHODS FOR THE GENERALIZATION OF VALUE FUNCTIONS IN THE RL STATE SPACE A THESIS SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL

ADAPTIVE TILE CODING METHODS FOR THE GENERALIZATION OF VALUE FUNCTIONS IN THE RL STATE SPACE A THESIS SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL ADAPTIVE TILE CODING METHODS FOR THE GENERALIZATION OF VALUE FUNCTIONS IN THE RL STATE SPACE A THESIS SUBMITTED TO THE FACULTY OF THE GRADUATE SCHOOL OF THE UNIVERSITY OF MINNESOTA BY BHARAT SIGINAM IN

More information

Mobile Robot Path Planning in Static Environments using Particle Swarm Optimization

Mobile Robot Path Planning in Static Environments using Particle Swarm Optimization Mobile Robot Path Planning in Static Environments using Particle Swarm Optimization M. Shahab Alam, M. Usman Rafique, and M. Umer Khan Abstract Motion planning is a key element of robotics since it empowers

More information

Obstacle Avoidance Project: Final Report

Obstacle Avoidance Project: Final Report ERTS: Embedded & Real Time System Version: 0.0.1 Date: December 19, 2008 Purpose: A report on P545 project: Obstacle Avoidance. This document serves as report for P545 class project on obstacle avoidance

More information

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Lecture 16 Cutting Plane Algorithm We shall continue the discussion on integer programming,

More information

Formations in flow fields

Formations in flow fields Formations in flow fields Rick van Meer June 11, 2015 1 Introduction Pathfinding and formations (i.e. an arrangement of agents) are both a part of artificial intelligence and can be used in games. However,

More information

Discrete search algorithms

Discrete search algorithms Robot Autonomy (16-662, S13) Lecture#08 (Monday February 11) Discrete search algorithms Lecturer: Siddhartha Srinivasa Scribes: Kavya Suresh & David Matten I. INTRODUCTION These notes contain a detailed

More information

Ian Mitchell. Department of Computer Science The University of British Columbia

Ian Mitchell. Department of Computer Science The University of British Columbia CPSC 542D: Level Set Methods Dynamic Implicit Surfaces and the Hamilton-Jacobi Equation or What Water Simulation, Robot Path Planning and Aircraft Collision Avoidance Have in Common Ian Mitchell Department

More information

Richard Williams Study Circle Handout: Disney 12 Principles of Animation. Frank Thomas & Ollie Johnston: The Illusion of Life

Richard Williams Study Circle Handout: Disney 12 Principles of Animation. Frank Thomas & Ollie Johnston: The Illusion of Life Frank Thomas & Ollie Johnston: The Illusion of Life 1 1. Squash and Stretch The principle is based on observation that only stiff objects remain inert during motion, while objects that are not stiff, although

More information

Physics I : Oscillations and Waves Prof. S Bharadwaj Department of Physics & Meteorology Indian Institute of Technology, Kharagpur

Physics I : Oscillations and Waves Prof. S Bharadwaj Department of Physics & Meteorology Indian Institute of Technology, Kharagpur Physics I : Oscillations and Waves Prof. S Bharadwaj Department of Physics & Meteorology Indian Institute of Technology, Kharagpur Lecture - 20 Diffraction - I We have been discussing interference, the

More information

Non-Homogeneous Swarms vs. MDP s A Comparison of Path Finding Under Uncertainty

Non-Homogeneous Swarms vs. MDP s A Comparison of Path Finding Under Uncertainty Non-Homogeneous Swarms vs. MDP s A Comparison of Path Finding Under Uncertainty Michael Comstock December 6, 2012 1 Introduction This paper presents a comparison of two different machine learning systems

More information

Navigation Mesh based Pathfinding for large crowds

Navigation Mesh based Pathfinding for large crowds Navigation Mesh based Pathfinding for large crowds Robert Lindner Introduction This paper is about methods that can be used to get as much performance as possible while simulating the pathfinding of large

More information

The 3D rendering pipeline (our version for this class)

The 3D rendering pipeline (our version for this class) The 3D rendering pipeline (our version for this class) 3D models in model coordinates 3D models in world coordinates 2D Polygons in camera coordinates Pixels in image coordinates Scene graph Camera Rasterization

More information

The Art Gallery Problem: An Overview and Extension to Chromatic Coloring and Mobile Guards

The Art Gallery Problem: An Overview and Extension to Chromatic Coloring and Mobile Guards The Art Gallery Problem: An Overview and Extension to Chromatic Coloring and Mobile Guards Nicole Chesnokov May 16, 2018 Contents 1 Introduction 2 2 The Art Gallery Problem 3 2.1 Proof..................................

More information

(Refer Slide Time: 00:04:20)

(Refer Slide Time: 00:04:20) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture 8 Three Dimensional Graphics Welcome back all of you to the lectures in Computer

More information

Rowena Cole and Luigi Barone. Department of Computer Science, The University of Western Australia, Western Australia, 6907

Rowena Cole and Luigi Barone. Department of Computer Science, The University of Western Australia, Western Australia, 6907 The Game of Clustering Rowena Cole and Luigi Barone Department of Computer Science, The University of Western Australia, Western Australia, 697 frowena, luigig@cs.uwa.edu.au Abstract Clustering is a technique

More information

Canny Edge Based Self-localization of a RoboCup Middle-sized League Robot

Canny Edge Based Self-localization of a RoboCup Middle-sized League Robot Canny Edge Based Self-localization of a RoboCup Middle-sized League Robot Yoichi Nakaguro Sirindhorn International Institute of Technology, Thammasat University P.O. Box 22, Thammasat-Rangsit Post Office,

More information

STEERING BEHAVIORS. Markéta Popelová, marketa.popelova [zavináč] matfyz.cz. 2012, Umělé Bytosti, MFF UK

STEERING BEHAVIORS. Markéta Popelová, marketa.popelova [zavináč] matfyz.cz. 2012, Umělé Bytosti, MFF UK STEERING BEHAVIORS Markéta Popelová, marketa.popelova [zavináč] matfyz.cz 2012, Umělé Bytosti, MFF UK MOTIVATION MOTIVATION REQUIREMENTS FOR MOTION CONTROL Responding to dynamic environment Avoiding obstacles

More information

SteerFit: Automated Parameter Fitting for Steering Algorithms Supplementary Document

SteerFit: Automated Parameter Fitting for Steering Algorithms Supplementary Document Eurographics/ ACM SIGGRAPH Symposium on Computer Animation (2014) Vladlen Koltun and Eftychios Sifakis (Editors) SteerFit: Automated Parameter Fitting for Steering Algorithms Supplementary Document Glen

More information

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development

Scene Management. Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development Video Game Technologies 11498: MSc in Computer Science and Engineering 11156: MSc in Game Design and Development Chap. 5 Scene Management Overview Scene Management vs Rendering This chapter is about rendering

More information

Volumetric Particle Separating Planes for Collision Detection

Volumetric Particle Separating Planes for Collision Detection Volumetric Particle Separating Planes for Collision Detection by Brent M. Dingle Fall 2004 Texas A&M University Abstract In this paper we describe a method of determining the separation plane of two objects

More information

Major Assignment: Pacman Game

Major Assignment: Pacman Game Major Assignment: Pacman Game 300580 Programming Fundamentals Week 10 Assignment The major assignment involves producing a Pacman style game with Clara using the Greenfoot files that are given to you.

More information

BCC 3D Extruded Image Shatter Filter

BCC 3D Extruded Image Shatter Filter BCC 3D Extruded Image Shatter Filter 3D Extruded Image Shatter shatters the image in 3D space and disperses the image fragments. Unlike the 3D Image Shatter filter, this filter allows you to create threedimensional

More information

Challenge Problem 5 - The Solution Dynamic Characteristics of a Truss Structure

Challenge Problem 5 - The Solution Dynamic Characteristics of a Truss Structure Challenge Problem 5 - The Solution Dynamic Characteristics of a Truss Structure In the final year of his engineering degree course a student was introduced to finite element analysis and conducted an assessment

More information

The Australian National University

The Australian National University The Australian National University Faculty of Engineering and Information Technology Department of Engineering The Examination and Exploration of Algorithms and Complex Behaviour to Realistically Control

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

More information

A bouncing ball squashes on its vertical axis and stretches on the horizontal axis as it strikes the ground.

A bouncing ball squashes on its vertical axis and stretches on the horizontal axis as it strikes the ground. Animation Principles The following 12 animation principles are those distilled from the combined wisdom of animators over several decades. Animators developed their own techniques in animating characters,

More information

Spatial Data Structures

Spatial Data Structures CSCI 420 Computer Graphics Lecture 17 Spatial Data Structures Jernej Barbic University of Southern California Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees [Angel Ch. 8] 1 Ray Tracing Acceleration

More information

Rapid Simultaneous Learning of Multiple Behaviours with a Mobile Robot

Rapid Simultaneous Learning of Multiple Behaviours with a Mobile Robot Rapid Simultaneous Learning of Multiple Behaviours with a Mobile Robot Koren Ward School of Information Technology and Computer Science University of Wollongong koren@uow.edu.au www.uow.edu.au/~koren Abstract

More information

CrowdMixer: Multiple Agent Types in Situation-Based Crowd Simulations

CrowdMixer: Multiple Agent Types in Situation-Based Crowd Simulations CrowdMixer: Multiple Agent Types in Situation-Based Crowd Simulations Shannon Blyth and Howard J. Hamilton Department of Computer Science University of Regina, Regina, SK, Canada S4S 0A2 {blyth1sh, hamilton}@cs.uregina.ca

More information

TRINITAS. a Finite Element stand-alone tool for Conceptual design, Optimization and General finite element analysis. Introductional Manual

TRINITAS. a Finite Element stand-alone tool for Conceptual design, Optimization and General finite element analysis. Introductional Manual TRINITAS a Finite Element stand-alone tool for Conceptual design, Optimization and General finite element analysis Introductional Manual Bo Torstenfelt Contents 1 Introduction 1 2 Starting the Program

More information

Spatial Data Structures

Spatial Data Structures CSCI 480 Computer Graphics Lecture 7 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids BSP Trees [Ch. 0.] March 8, 0 Jernej Barbic University of Southern California http://www-bcf.usc.edu/~jbarbic/cs480-s/

More information

Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps

Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps Visualization and Analysis of Inverse Kinematics Algorithms Using Performance Metric Maps Oliver Cardwell, Ramakrishnan Mukundan Department of Computer Science and Software Engineering University of Canterbury

More information

Announcements. Ray tracer is due in five days you should have started by now or you re going to have a bad week. Missing file posted on the web page

Announcements. Ray tracer is due in five days you should have started by now or you re going to have a bad week. Missing file posted on the web page Announcements Ray tracer is due in five days you should have started by now or you re going to have a bad week Missing file posted on the web page I m sorry for canceling class on Tuesday... 1 Animation

More information

A Low Power, High Throughput, Fully Event-Based Stereo System: Supplementary Documentation

A Low Power, High Throughput, Fully Event-Based Stereo System: Supplementary Documentation A Low Power, High Throughput, Fully Event-Based Stereo System: Supplementary Documentation Alexander Andreopoulos, Hirak J. Kashyap, Tapan K. Nayak, Arnon Amir, Myron D. Flickner IBM Research March 25,

More information

The Fly & Anti-Fly Missile

The Fly & Anti-Fly Missile The Fly & Anti-Fly Missile Rick Tilley Florida State University (USA) rt05c@my.fsu.edu Abstract Linear Regression with Gradient Descent are used in many machine learning applications. The algorithms are

More information

Cloth Simulation. Tanja Munz. Master of Science Computer Animation and Visual Effects. CGI Techniques Report

Cloth Simulation. Tanja Munz. Master of Science Computer Animation and Visual Effects. CGI Techniques Report Cloth Simulation CGI Techniques Report Tanja Munz Master of Science Computer Animation and Visual Effects 21st November, 2014 Abstract Cloth simulation is a wide and popular area of research. First papers

More information

GPU-based Distributed Behavior Models with CUDA

GPU-based Distributed Behavior Models with CUDA GPU-based Distributed Behavior Models with CUDA Courtesy: YouTube, ISIS Lab, Universita degli Studi di Salerno Bradly Alicea Introduction Flocking: Reynolds boids algorithm. * models simple local behaviors

More information

SWARM INTELLIGENCE -I

SWARM INTELLIGENCE -I SWARM INTELLIGENCE -I Swarm Intelligence Any attempt to design algorithms or distributed problem solving devices inspired by the collective behaviourof social insect colonies and other animal societies

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

More information

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection

Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search

More information

CS770/870 Spring 2017 Animation Basics

CS770/870 Spring 2017 Animation Basics Preview CS770/870 Spring 2017 Animation Basics Related material Angel 6e: 1.1.3, 8.6 Thalman, N and D. Thalman, Computer Animation, Encyclopedia of Computer Science, CRC Press. Lasseter, J. Principles

More information

CS770/870 Spring 2017 Animation Basics

CS770/870 Spring 2017 Animation Basics CS770/870 Spring 2017 Animation Basics Related material Angel 6e: 1.1.3, 8.6 Thalman, N and D. Thalman, Computer Animation, Encyclopedia of Computer Science, CRC Press. Lasseter, J. Principles of traditional

More information

Bumptrees for Efficient Function, Constraint, and Classification Learning

Bumptrees for Efficient Function, Constraint, and Classification Learning umptrees for Efficient Function, Constraint, and Classification Learning Stephen M. Omohundro International Computer Science Institute 1947 Center Street, Suite 600 erkeley, California 94704 Abstract A

More information

Constrained Diffusion Limited Aggregation in 3 Dimensions

Constrained Diffusion Limited Aggregation in 3 Dimensions Constrained Diffusion Limited Aggregation in 3 Dimensions Paul Bourke Swinburne University of Technology P. O. Box 218, Hawthorn Melbourne, Vic 3122, Australia. Email: pdb@swin.edu.au Abstract Diffusion

More information

An object in 3D space

An object in 3D space An object in 3D space An object's viewpoint Every Alice object has a viewpoint. The viewpoint of an object is determined by: The position of the object in 3D space. The orientation of the object relative

More information

ABSTRACT BACKGROUND PSIG 05B3

ABSTRACT BACKGROUND PSIG 05B3 PSIG 05B3 Simulating pipeline control systems for operator training David Basnett, Atmos International Ltd, John Lewis, Atmos International Inc. Copyright 2003, Pipeline Simulation Interest Group This

More information

Everything You Always Wanted To Know About Programming Behaviors But Were Afraid To Ask

Everything You Always Wanted To Know About Programming Behaviors But Were Afraid To Ask Everything You Always Wanted To Know About Programming Behaviors But Were Afraid To Ask By Kevin Harrelson Machine Intelligence Lab University of Florida Spring, 1995 Overview Programming multiple behaviors

More information

(Refer Slide Time: 00:02:02)

(Refer Slide Time: 00:02:02) Computer Graphics Prof. Sukhendu Das Dept. of Computer Science and Engineering Indian Institute of Technology, Madras Lecture - 20 Clipping: Lines and Polygons Hello and welcome everybody to the lecture

More information

Using surface markings to enhance accuracy and stability of object perception in graphic displays

Using surface markings to enhance accuracy and stability of object perception in graphic displays Using surface markings to enhance accuracy and stability of object perception in graphic displays Roger A. Browse a,b, James C. Rodger a, and Robert A. Adderley a a Department of Computing and Information

More information

FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE

FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE FROM A RELATIONAL TO A MULTI-DIMENSIONAL DATA BASE David C. Hay Essential Strategies, Inc In the buzzword sweepstakes of 1997, the clear winner has to be Data Warehouse. A host of technologies and techniques

More information

Python and Pygame Simulating. Ambulance Response

Python and Pygame Simulating. Ambulance Response Python and Pygame Simulating Ambulance Response By Corey Bennett Submitted in Partial Fulfillment of the Requirements for the Degree of Bachelor of Computer Science Department of Computer Science and Mathematics

More information

Spatial Data Structures

Spatial Data Structures 15-462 Computer Graphics I Lecture 17 Spatial Data Structures Hierarchical Bounding Volumes Regular Grids Octrees BSP Trees Constructive Solid Geometry (CSG) April 1, 2003 [Angel 9.10] Frank Pfenning Carnegie

More information

AUTOMATED 4 AXIS ADAYfIVE SCANNING WITH THE DIGIBOTICS LASER DIGITIZER

AUTOMATED 4 AXIS ADAYfIVE SCANNING WITH THE DIGIBOTICS LASER DIGITIZER AUTOMATED 4 AXIS ADAYfIVE SCANNING WITH THE DIGIBOTICS LASER DIGITIZER INTRODUCTION The DIGIBOT 3D Laser Digitizer is a high performance 3D input device which combines laser ranging technology, personal

More information