Beetle Studies

Here you will find two applets, which are an attempt to model ground beetle behaviour. Ground beetles live in arable fields and eat pests such as aphids and slugs and are often seen as beneficial to a farmer. The idea here is to simulate a field and many beetles, and some traps into which the beetles might fall, and to contrast this with the field study cases where actual traps are deployed, to see how closely a simple simulation models actual behaviour.

This model is the subject of an MSc. Thesis at Cranfield University at Silsoe.

If you can't run these applets - you may need to update your machine to support the latest Java Runtime Environment which is a free download from the following URL (Just click on the "free download - Java for the desktop" button in the top right when you get there):

If you want to check that this is OK beforehand, there is an official explanation and a link to the same site at Microsoft's site at:

General Notes

The two applets both use the same objects for beetles and a field. They represent the results of the simulation in different ways. The first is a visual representation of a beetle's path within a field, the second is a graphical representation of the final result. The field is 500 units wide and 900 units long. The beetle is a dimensionless point.

The beetle is modelled as an object which has two behaviours - direction, and distance. At each jump the beetle makes a decision how far to travel and in which direction. Field studies indicate a maximum of 10m for a 24hr movement of a large ground beetle in an arable field (Gardner et al. 2001). At the overall field boundaries the beetles can reflect or absorb, the default is reflect. There is a hedge modelled in the field at a distance of 50 units from the left hand side, the beetles may not cross this boundary by default. (That is: the reflectance is set to 100% on both sides by default.) There are two zones modelled near the hedge. The reflectance can be set at the interfaces of these aswell. There are two areas of contrasting food in which the beetle behaviour can be changed.

The models measure output in two ways, final density and pitfall trap capture. The final density is an indication of where the beetles end up after all the movements, in the graphical representation this is output in the blue graph, and the units of measurement are the total numbers in each 20 unit slice of the field - from left to right. The pitfall traps are also in a line from left to right, at 10 unit intervals for the first 100 units and 50 unit intervals thereafter. A beetle may fall into a pitfall trap and die if its path crosses this area - then the pitfall trap registers this event and the result is output in the trap line as a number line in the visual output, and represented graphically in the graphical interpretation.


I would start with the visual representation, and use a lowish number of beetles, say 100, if you go much past 5000, the screen just goes black, after a while. If you need to model 100's of thousands or millions of beetles, use the graphical representation.

Many parameters can be changed in the graphical representation and hopefully the interface is simple and intuitively obvious. In this case the beetle numbers are effectively unlimited, but it can take time - the time taken for each simulation is noted in the output screen to help with future planning. This is the one called "pilot" which is used exclusively in the thesis to simulate field data.



Visual Interpretation

Graphical Interpretation - The "pilot" applet

Note regarding Determination

I have modelled determination, by starting with a random direction ( in the range 1 - 360 degrees ) and then chosing to follow the same direction at each new jump. The more determined - the higher you set the determination variable - the more likely the beetle is to carry on in the same direction, and less determined beetles deviate by a randomly greater or lesser extent set by the determination factor ( an interger value between 0-10 ). In simple terms this works in the following manner: If you set a determination value of 2, the computer picks a random number in the range 1 to (360/2 =) 180, and does this 2 times, in this case the "divisor" is 2, the result is a normal distribution around a mean of 180, and a standard deviation of 73. The higher the determination factor, the more tightly the range of probably resultant values fall around 180, and finally if the determination factor is 10, its always going to come up with 180 exactly, which means the beetle is going to move in a straight line.

Here is a simple applet that represents the result of running this calculation for many replications, note that in this applet the divisor is in the range 1-360.

The following table summarises results for 1,000,000 replications (in all cases the mean is 180):

Determination Factor Divisor Standard Deviation
1 1 104
2 2 73
3 4 51.87
4 8 36.8
5 15 26.97
6 30 19.9
7 60 13.8
8 90 11.65
9 180 9.45
10 360 0


to convert to the applets above for beetle movements; The deviation angle is the result minus 180, added or subtracted from the current direction. The effect of this can be visually seen by changing this parameter in the visual model. If the determination factor is set to 0 the jumps are entirely random in direction at every hop.


References, for this page:

Gardner S. M., Allen D. S., Gundrey A. L., Luff M. L., and Mole A. C. 2001 Ecological evaluation of the arable stewardship pilot scheme, 1998-2000. Technical annex IV, ground beetles. Web available at: - accessed 9/6/04.



TOP of Page