Programming Interest Group
This page is for the Teesside Programming Interest Group (T-PIG) but we are happy for anyone to join in. We have an ongoing interest in evolutionary computing (see Sprog below) and we are starting to build some Mindstorms robots. We also run a couple of competitions.

page contents...


the December 2013 competition
This year's competition is a bit different to previous years, as usual it's not too serious, but this year there's no real programming!

Your challenge this year is to use BuzzBug (a Netlogo genetics-model) to evolve your own bugs.

Winners of the competition will be the people/groups who produces the "best" bug as voted by a judging panel.

There are 3 categories...

  1. best looking bug
  2. best sounding bug
  3. best combined bug (look & sound)
If you want to enter (one or more) bug genome(s) for the competition please send them in by email (closing date Monday 9th December). Send emails to with the subject line "BuzzBug competition". Send the genome in text form using the "control" alphabet & give each of your genomes a name. Note: if bugs are too big (draw outside of their grid cell) they may be disqualified.

The competition will be judged on Wednesday afternoon 11th December (location tba). Anyone is welcome to join the judging panel.


BuzzBugs, the model...

The BuzzBug model investigates the way in which simple genetic operators (cross-over & mutation) effect inheritance. The model holds a small population of "bugs", each defined by a short digital gene sequence. A bug's genome defines its shape and the sound it makes. You can select parents to breed new bugs with modified genomes.

Getting started...
  1. save the BuzzBug model as "SiBuzzBugs.nlogo"
  2. make sure you have the sound on!
  3. start NetLogo and load "SiBuzzBugs.nlogo"
  4. click the [setup] button in the model to start
  5. the grid shows 25 "bugs" (shape & sound defined by their digital genome)
  6. listen to bugs by clicking the [play] button then clicking the mouse on the bug shape in the grid
  7. breed new bugs using [select P1] and [select P2] to choose 2 parents (click the button then click on the shape you want in the grid), use [select-NEW] to identify which bug you want to replace and [breed(P1,P2)=>NEW] to get the breeding to take place
  8. to see all genomes press [print genomes]
  9. for more details check the info tab on the model
the model grid...


We have an ongoing project involved with the Simulation of Predator/Prey species Roaming on a Grid-World (sprog).

We aim to develop sprog into an evolving artificial life system which runs in a 2D graphics world and contains various interacting alife-forms (individuals) from multiple alife species.

At this stage we provide a minimalist skeleton for this work which uses NetLogo as a graphics environment and links into Java. As it develops we will extend the Java side and may provide additional middleware to link through to other languages & platforms (see diagrams in sprog intro 1a -ppt.pdf for possible system structure).

The following components are provided as part of the skeletal system...

  1. guide to the skeletal prototype -- read this to find out how to set up and run the system
  2. sprog-0-files.ZIP -- the Java files
  3. sprog.jar -- the .jar extension for NetLogo
  4. sprog-0(1a).nlogo -- the NetLogo model which runs the prototype
  5. sprog-0(clean).nlogo -- another model to help clean the cache (see notes)


pig rescue -- the 2012 competition
  Brief: write the controller for a golf cart that trundles round a maze rescuing pigs that have got lost & brings them back to a pig-sty.
  • the competition spec. -- check here for more details, competition rules, details of the Netlogo code provided, etc
  • the .nls include file -- contains most of the supporting NetLogo code
  • a sample model -- this model defines the interface and gives an example of a maze runner / PIG finder. The example works to some extent but shouldn't win any prizes.
  • NB: to run the model ,save the include file & the model file in the same folder then load the model into NetLogo.


the cow & car competition
Brief: to write the behaviours for 'cows' and/or 'cars' in a chase/evade model where cars aim to run-over cows & cows try to keep out of the way of cars. Cars run on bio-fuel and are refuelled by the cows they run-over.

There are a couple of rules/restrictions for cow & car behaviour (contact t-PIG for details). t-PIG hold an annual competition where all the implementations of cows & cars are run off against each other.

Everyone is welcome to submit a model either working alone or as a programming team. Please get in touch if you want to enter your model into the competition.

Check here for a skeletal car/cow model which you can fit your code into. Plug the behaviours you write into the procedures called "move-smart-car" and "move-smart-cow". You may also need to change "setup-smart-cow" and "setup-smart-car" if you want something special on setup. The car refuelling feature is built into the skeletal the model but can be switched on/off by using the "car-dies-if-no-fuel?" switch on the interface.

NB: Please see the NetLogo pages for links to guides, etc for writing NetLogo.

the 2012 competition entries
The 2012 cow & car competition took place in May, check cow&car -- 1c.nlogo for the model which runs all the cows 'n' cars we tried.


...and many thanks to the 2011 AI Applications students who's work was also included in the competition.


the swarm competition
This is new for 2013 so more details will follow.

The main idea is to use NetLogo to specify a swarming agent with the ability to surround (and kill) other swarming agents (detailed rules to follow). Prizes (usual type - don't get exited) are for dominant swarms, interesting emergent behaviours and anything else the group finds interesting.


an intro to Python from Iraklis Akritas


This section contains short articles following discussions we have had at PIG and/or in programming seminars. Contributions are welcome from everyone.
  1. Java strings -- strings, equality tests and interning
    this follows on from a discussion started in an AI Programming session