Discworld

Generations of worms - Science of Discworld 3

For literary discussions, of both Pratchett and other authors.

Generations of worms - Science of Discworld 3

Postby The_Professor_UK » Thu Jun 11, 2020 09:31 am

I love the Science of Discworld series....

I have been working on some experiments using the field programmable gate arrays and the evolution algorithm as discussed in the Science Of Discworld...

As far as The Science of Discworld 3, I got fascinated by the growth rate of the worm growing by 1/1000% per generation. The figure given is that in 100 million years it would have grown to a length of 30 feet (10mtrs Long). I felt that the maths did not add up.......

I started with the length of 100mm (10cm, 4 inches)

So I wrote a very simple programme Image

I thought that the 100 million years to reach 10 metres seemed a little convenient. and my programme proved this was the case. Right up to writing this when I realised that I had missed a zero out :cry:

I am currently re-running the programme and will soon be able to confirm how close the book figure is to my very rough and ready simulation. (108,000 generations and not reached 300mm yet!)

Now it is really speeding up, in a matter of 405,000 generations, the worm has reached a whopping 5 metres (approx)

So, in the end I cannot get the 100 million years figure to work!!!

What am I doing wrong?

Image

Just to explain... The programme allows you to enter the desired length you want the worm to evolve to
Then it adds 1/1000% each generation
the programme stops when the desired length is reached.
The number of years is based on an earthworm breeding every 60-90 days.....
They called me Mad, you know!!!
:D :D :D :D :D :D :D :D :D :D
User avatar
The_Professor_UK
 
Posts: 17
Joined: Wed Jun 10, 2020 04:42 pm
Location: West Yorkshire, UK

Re: Generations of worms - Science of Discworld 3

Postby dried_frog » Thu Jun 11, 2020 02:18 pm

Hello, Prof !

You are right on the calculations, I just quickly made a small program that does the same calculations as you and I get (almost) the same results.

But what is written in the book may not be as false as we might think :wink: :
Imagine a species of worm four inches (10 cm) long, whose length increases by one thousandth of a per hundred every year, so that even very accurate measurements would not detect any change on a yearly basis. In a hundred milion years, the descendants of that worm would be 30 feet (10m) long


You have to do the increment "per year" and not "per generation", that changes a lot of things ... since it is exponential. :D
"It's still magic even if you know how it's done."
User avatar
dried_frog
 
Posts: 116
Joined: Fri Dec 19, 2014 07:05 pm
Location: France

Re: Generations of worms - Science of Discworld 3

Postby The_Professor_UK » Thu Jun 11, 2020 03:39 pm

Surely, if we are right with the per year thing, would that be the same as saying one generation per year?

so it would still only take 570,000 years (ish)

but to try and give the maths a chance, I have divided the generation growth rate by 5 (as there are 5 generations per year in my simulation)

This may take a while.....

Being old...... and old fashined, I do like Basic for this kind of thing. Please remember that I started when basic was the ultimate new fangled device :D

I will post the number of years later.... Maybe I did just mess up my formula a little bit....

Thank you for your advice... And I am happy to find out that I am not alone in writing small programmes just to verify the facts in a book :D
They called me Mad, you know!!!
:D :D :D :D :D :D :D :D :D :D
User avatar
The_Professor_UK
 
Posts: 17
Joined: Wed Jun 10, 2020 04:42 pm
Location: West Yorkshire, UK

Re: Generations of worms - Science of Discworld 3

Postby dried_frog » Thu Jun 11, 2020 03:51 pm

Even taking into account what I just wrote, I get 570 382 years for 30m, we are far ... :?

I believe, ultimately, that what they meant was that:

if the worms grow each year by 1/100 000 "of the initial size" ... and not "of the size of the previous year" ..

and even in this case there is a problem: in 100,000,000 years, we would get 100m (about 300 feet), and not 10m

There is probably a typo error somewhere ... unless I didn't understand anything! :shock:
"It's still magic even if you know how it's done."
User avatar
dried_frog
 
Posts: 116
Joined: Fri Dec 19, 2014 07:05 pm
Location: France

Re: Generations of worms - Science of Discworld 3

Postby The_Professor_UK » Thu Jun 11, 2020 04:12 pm

I do believe you are right!

after all, the measurement is too small to be measured, and if we use the cumulative value, they are growing be over 2mm per generation.....

my current simulation is still running and after 36,000 years, the worm is 143mm long....

If this does not work, I will use a non-cumulative value but keep it to 5 generations per year at a fifth of the overall value..... then it does not become exponential...

There must be a fact here to latch on to.....

I don't know if you have done any trials with the FPGA experiments from Science 1....
They are really fascinating! I use a proper Frankenstein rig for that, I have one FPGA being evolved using a Pi3 with an Arduino giving output signals and monitoring input signals. Just to ensure there is no cross platform communications... but that is probably a separate post :D
They called me Mad, you know!!!
:D :D :D :D :D :D :D :D :D :D
User avatar
The_Professor_UK
 
Posts: 17
Joined: Wed Jun 10, 2020 04:42 pm
Location: West Yorkshire, UK

Re: Generations of worms - Science of Discworld 3

Postby dried_frog » Thu Jun 11, 2020 04:55 pm

Yes, if the value is no longer exponential, then a simple calculation "on paper" may suffice.

I don't know what 'FPGA experiments from Science 1' is ... I'm French! :lol:

But I know what an arduino and a raspberry pi are. :wink:

Part of my work concerns system programming (unix, linux) and the design of universes in systems like SAP BI for large databases, but I don't know electronics at all!

Good patience for the calculations! :thumbr:
"It's still magic even if you know how it's done."
User avatar
dried_frog
 
Posts: 116
Joined: Fri Dec 19, 2014 07:05 pm
Location: France

Re: Generations of worms - Science of Discworld 3

Postby The_Professor_UK » Thu Jun 11, 2020 08:05 pm

OOOOH, there is a brilliant bit on emergent behaviour in the Science of Discworld 1 where a set of logic gates are evolved to provide specific outputs depending on inputs. So to highlight potential differences between software and hardware, an experiment was done using a Field Programable Gate Array to create physical logic circuits, being programmed by an evolution system.

In my case, an Field Programmable Gate Array from Ebay, and Pi3 as my evolution system and an unconnected Arduino that supply the input signal to the FPGA, read the output and then just give a High signal to the Pi once the the required output is correct....

It is like having your own civilisation developing on your desk... Have a read and let me know what you think.....

current simulation stats... about 500,000 generations
just over 100,000 years
and we are still at only 275mm
it is still an exponential, but so small that we may get to the 100,000,000


(i forgot to press submit, so before I call it a night, the final figures for today...
1.5 million generations
296000 years
and the worm has grown to nearly 2 metres :D

we may be close to getting figures to match the book!!!
They called me Mad, you know!!!
:D :D :D :D :D :D :D :D :D :D
User avatar
The_Professor_UK
 
Posts: 17
Joined: Wed Jun 10, 2020 04:42 pm
Location: West Yorkshire, UK

Re: Generations of worms - Science of Discworld 3

Postby The_Professor_UK » Fri Jun 12, 2020 06:23 pm

Still trying to get to the bottom of this....

very quick rewrite of the programme to be 1/1000% of the original length only as suggested.

and the results are interesting.

As it is a fixed value, the percentage growth is actually getting less compared with the growing length. The maths didn't seem to support this on a calculator, but nerarly 5 million years in now and the worm is 4.5 metres long.... but the percentage growth will be less each million years......

Image

Sometimes, I get accused of over thinking things, you don't think I am doing that now do you :?: :?: :lol: :lol: :lol: :lol:
They called me Mad, you know!!!
:D :D :D :D :D :D :D :D :D :D
User avatar
The_Professor_UK
 
Posts: 17
Joined: Wed Jun 10, 2020 04:42 pm
Location: West Yorkshire, UK

Re: Generations of worms - Science of Discworld 3

Postby The_Professor_UK » Fri Jun 12, 2020 07:56 pm

I know I am taking this too far, but i cannot back out now....

so final post on the worm....
it is 5.18 metres long and has been evolving for 5 million 186 thousand years....

the growth rate seems to be about 0.9mm per million years....

Will give an update tomorrow
They called me Mad, you know!!!
:D :D :D :D :D :D :D :D :D :D
User avatar
The_Professor_UK
 
Posts: 17
Joined: Wed Jun 10, 2020 04:42 pm
Location: West Yorkshire, UK

Re: Generations of worms - Science of Discworld 3

Postby The_Professor_UK » Sun Jun 14, 2020 03:35 pm

So We have the answer......


If the worm in question breeds 4-5 times per year, it would take only 30,490,60 tear for the 100mm (4" worm) to grow to 10mtrs(30 feet)

However, the number of generations in my simulation is 152,450,300! (5 generations per year)


if the worm bred only once per year, and the number of generations above included years where only 3 or 4 generations were born, then 100,00,000 years is perfectly possible :D
am so glad that it was not just the first number thought of....

:D

Image
They called me Mad, you know!!!
:D :D :D :D :D :D :D :D :D :D
User avatar
The_Professor_UK
 
Posts: 17
Joined: Wed Jun 10, 2020 04:42 pm
Location: West Yorkshire, UK

Re: Generations of worms - Science of Discworld 3

Postby Kelshandra » Thu Jul 16, 2020 10:17 pm

*Puts on genetics hat*
Of course this assumes that there is a selective advantage to being a 10m worm over a smaller worm. And depending on the strength of that selective advantage, the rate of change per generation will differ. * If there is a positive selection pressure for being larger, the greater the advantage, the faster the rate of change (and depending on mutation rate in worms to generate the new size alleles needed). If being bigger is not an advantage (neutral) or is in fact a negative, you wouldn't see this change at all.

I did a bit of quick research to check if the giant Earthworms here in Australia (Megascolides australis) are the biggest and it looks like they are**- up to 2m long. The fact that seems to be the upper limit in worm size suggests that we won't get bigger than that as bigger isn't always better. Bigger means more food, more gas exchange to keep alive (they breathe through their skin). There isn't a lot of data on earthworms but what I could find is that these guys are also fairly slow to mature(several years), and have a slow reproduction rate.

*I'm going to ignore genetic drift (the randomness of the universe resulting in worms living and dying for non-size reasons) and population size (which will affect the overall rate of change in average size and drift) but they also would occur.

** There was an individual Microchaetus rappi that was 6.7m long found in South Africa in 1967 according to Guinness World reccords but that seems to be a freak exception, normally that variety is about 1.8m long

Anyhow, just throwing that in the mix as Biology makes models more 'interesting' the deeper down the rabit hole you want to go! :meow:
Currently semi-irregularly working on the 2010 and 2020 Yearbooks- 2019 is ready to go!
GNU Terry Pratchett
User avatar
Kelshandra
 
Posts: 7417
Joined: Thu Feb 17, 2005 05:11 am
Location: SE corner of XXXX


Return to The Reading Room

Who is online

Users browsing this forum: No registered users and 1 guest

cron