Termite Construction and Agent-Based Simulation - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

Termite Construction and Agent-Based Simulation

Description:

... such as termites, ants and bees successfully accomplish ... Probability of building when queen pheromone level lies in a particular range. Crude physics ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 48
Provided by: anon186
Category:

less

Transcript and Presenter's Notes

Title: Termite Construction and Agent-Based Simulation


1
Termite Construction and Agent-Based Simulation
  • Dan Ladley,
  • Leeds University Business School and School of
    Computing

danl_at_comp.leeds.ac.uk www.comp.leeds.ac.uk/danl
2
  • Social Insects
  • Social insects such as termites, ants and bees
    successfully accomplish many complex tasks
    through cooperation.
  • These include
  • Locating food sources
  • Building nests
  • Dividing labour
  • Brood Sorting

3
  • Computing Applications
  • Insects have evolved solutions to challenging
    distributed coordination problems which have been
    successfully adapted to real world systems.
  • Locating food sources -gt Shortest path
    algorithms
  • Building nests -gt Nano-technology, Space
    Exploration
  • Dividing labour -gt Task Allocation problems
  • Brood Sorting -gt Graph partitioning, data
    analysis

4
  • Termite nest formation
  • Many individual termites participate in the
    construction of termite nests. Due to the large
    size of the next relative to individual termites
    and the number of individuals involved this is a
    difficult coordination problem.
  • The most common ways of coordination are
  • Blueprint Leader
  • Plan Template

5
  • Stigmergy
  • The above methods do not work for termites
    instead they employ stigmergy. Cues in the
    environment encourage termites to make certain
    behaviours which in turn effect the environment
    effecting future behaviours.
  • Termites respond to many environmental cues.
    These include
  • Pheromones
  • Cement, Queen, Trail
  • Temperature
  • Air Movements
  • Humidity

6
  • Structures Formed
  • Domes
  • Pillars
  • Walls
  • Entrances
  • Tunnels
  • Air conditioning
  • Fungus farms

7
  • Previous Model
  • Demonstrated the existence of pillars, chambers,
    galleries and covered paths
  • No consideration of logistic factors or inactive
    material
  • E. Bonabeau, G. Theraulaz, J-L. Deneubourg, N.
    Franks, O. Rafelsberger, J-L. Joly, S. Blanco. A
    model for the emergence of pillars, walls and
    royal chambers in termite mounds. Philosophical
    Transactions of the Royal Society of London,
    Series B, 3531561-1576, 1998.

8
  • Agent Based Model
  • Three dimensional discrete world
  • Populated by a finite number of termites
  • Three pheromone types
  • Cement given off by recently placed material
  • Trail given off by moving termites
  • Queen given off by stationary queen
  • Diffusion through finite volume method

9
  • Agent Movement
  • May move to any adjacent location as long as
  • There is no building material present
  • The new location is adjacent to material
  • Movement influenced by cement pheromone
  • Roulette wheel selection based on pheromone
    gradients
  • Random Movement with probability 1/Gradient

10
  • Agent Building Behaviour
  • Probability of building when queen pheromone
    level lies in a particular range
  • Crude physics
  • Newly placed material gives off cement pheromone

11
Chambers
12
Recruitment
13
Tunnels
14
Flared Tunnels
15
Narrow Tunnels
16
  • Dome Entrances
  • Currently no entrance in chambers
  • New class of Worker termites go to and from the
    queen
  • Deposit inhibitory trail pheromone

17
Entrances
18
Targets
19
  • Pros and Cons of this model
  • Reproduces results seen in nature
  • Importance of logistic constraints
  • Applications in real situations space
    exploration, nano-tech
  • Simplistic movement strategy
  • Artefacts due to tessellation of world
  • No accounting for castes of termites

20
  • Agent-based modelling is employed in other
    fields, in particular it is key to current
    research in epidemiology, transport studies and
    defence.
  • Many fields investigate problems involving many
    interacting individuals engaging in potentially
    complex and changing relationships which are
    frequently difficult to analyse with more
    traditional techniques.

21
  • Agent Based Models
  • Allow the investigation of
  • Heterogeneous individuals
  • Bounded rationality
  • Complex relationships
  • The time path or dynamics of a system

22
  • Agent-Based Models
  • These models have draw backs
  • They do not provide proofs only demonstrations of
    sufficiency
  • There are typically many ways to model any given
    situation
  • Parameters, parameters and more parameters

23
  • A Game
  • Its January 1926 you have 1 to invest
  • If you invested it in US Treasury bills, one of
    the safest bets around, and reinvested all of the
    proceeds how much would you have now?

14
24
  • If you invested it in the SP 500 index (the
    stock market), a much riskier bet, how much would
    you have now?

1370
25
  • Now suppose that each month you were able to
    divine which would do better and invested
    everything in that, how much would you have?

2,296,183,456
26
  • Motivation
  • In order to predict what is going on in financial
    market it is vital to separate the effect of the
    market mechanism and individual behaviour.
  • The order book market mechanism is employed (with
    variations) in the majority of the worlds major
    financial institutions.

27
  • Order book markets
  • Similar to a continuous double auction
  • Traders submit orders to the market
  • Market Orders execute immediately at the best
    available price for the specified quantity
  • Limit Orders are added to the order book at the
    specified quantity and price
  • Trade results in limit orders being removed from
    the book

28
  • Example order book

Buy Order Buy Order Sell Order Sell Order

10
10 20 10 20 30 10 10
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Price Price Price Price
29
  • Example order book

Buy Order Buy Order Sell Order Sell Order

10
10 20 10 20 30 10 10
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
Price Price Price Price
Best Ask
Best Bid
Spread
30
  • Understanding order book markets
  • Analytical work - Difficult to maintain
    analytical tractability
  • Empirical and experimental work - Difficult to
    separate trader strategy from the effect of the
    market mechanism
  • Simulation work how should the traders agents
    behave?

31
  • Solution - Zero Intelligence
  • Traders modelled to behave randomly, consequently
    any effects observed in the data are due to the
    market mechanism. Those not observed are then
    dependant on individual behaviour.

Observed Behaviour Effect of Trader Strategy Effect of Market Mechanism
32
  • Agent-Based Model
  • 100 traders each initially allocated 50 units to
    either buy or sell with reservation prices
    stepped between 0 and 100
  • Each time step one trader selected at random to
    submit an order for a random number of units at a
    random price drawn from a uniform integer
    distribution constrained by the limit prices of
    the traders units
  • With a set probability new traders enter and
    leave the market each time step

33
  • Orders classified into 12 types based on
    aggressiveness (Biais et al. 1995)

Buy Orders Sell Orders
1 Market larger quantity 7 Market larger quantity
2 Market equal quantity 8 Market equal quantity
3 Market smaller quantity 9 Market smaller quantity
4 Limit between quotes 10 Limit between quotes
5 Limit at quote 11 Limit at quote
6 Limit below Quote 12 Limit below Quote
34
  • Order Book Mechanism

Sell Order Sell Order Buy Order Buy Order
10
10 20 10 20 30 10 10
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
Price Price Price Price
35
From\To 1 2 3 4 5 6 7 8 9 10 11 12
1
2
3
4
5
6
7
8
9
10
11
12
36
  • Also predicts
  • Details of the bid ask spread
  • Intra-book spreads
  • Quantities available at the quotes
  • Effect of changes of the tick size
  • Importance of the tips of the order book
    (Griffith et al. 2000 etc.)
  • Correlation between price movements and order
    book shape (Huang Stoll 1994, Parlour 1998
    etc.)

37
  • Conclusions
  • Much of the order dynamics typically observed in
    markets can be explained as a consequence of the
    order book market mechanism
  • In many cases trader strategy may not be the
    dominant force in observed market behaviour
  • However this is only half of the story we still
    need to understand the strategies employed by
    traders

38
  • Model as before, except
  • The agents are now trading a financial asset
    (e.g. a stock in a company) and money
  • They are paid dividends and interest and must
    consume a fraction of their wealth each time step
  • They are subject to margin constraints a limit on
    the amount of money a trader may borrow to some
    fraction of there net-worth
  • And the traders have strategy

39
  • Genetic Programs
  • Programs are provided with the 8 input parameters
    (information about the market)
  • Two outputs, the quantity and price are returned
  • Quantity Rounded to Integer Values
  • Price Rounded to 0,1 then mapped to
    10000,20000
  • Three registers for variable manipulation are
    provided

40
  • Genetic Program Example

Instruction Program
1 R0 2
2 R1 ps
3 R0 R0 R1
4 R1 R1 pb
5 Return R0
Results 2ps
41
  • Genetic Programming Tournaments
  • One Tournament per trading period
  • 4 Individuals selected at random
  • Fitness equal to net worth
  • 2 Least fit individuals have their strategies
    replaced

42
  • Genetic Programming Mutation

Instruction Program Instruction Program
1 R0 2 1 R0 2
2 R1 ps 2 R1 ps
3 R0 R0 R1 3 R0 R0 R1
4 R1 R1 pb 4 R0 R0/5
5 Return R0 5 Return R0
Results 2ps Results 2ps/5
43
  • Genetic Programming Recombination

Program 1 Program 2 Program 1 Program 2
1 R0 pb R0 2 1 R0 pb R0 2
2 R1 ps R1 pb 2 R1 ps R1 pb
3 R0 R0 5 R0 R0/R1 3 R0 R0/R1 R0 R0 5
4 R1 R1 ps R1 R1 - 1 4 R1 R1 - 1 R1 R1 ps
5 Return R0 R0 min(R0,R1) 5 R0 min(R0,R1) Return R0
6 Return R0 6 Return R0
Result 5pb Min(2/ pb, pb-1) Result Min(pb /ps, ps-1) 10
44
  • Analysis of Margin Constraints
  • Vary ß from 0 to 1 in increments of 0.1
  • ß 0 corresponds to no buying on margin
  • ß 1 corresponds to having no restriction on
    capacity to buy (unrealistic)

45
  • Average Bankruptcy Size

46
  • Wealth Distributions

47
  • Conclusions
  • There exists an optimal level of market
    regulation reducing bankruptcy
  • Traders strategies depend heavily on the level of
    borrowing allowed
  • Agent-based models can provide insights into
    these systems unachievable with other techniques.
Write a Comment
User Comments (0)
About PowerShow.com