Bidirectional pseudo-random generator
A pseudo-random generator is a random generator which generates a very long
sequence of numbers, which repeat exactly after a certain number of steps.
This number is also called the cycle length. Often, when the state of the
random number generator consists of n bits, it is possible to achieve
a cycle length of a the n-th power of two minus one, meaning that the
sequence contains all the possible values except for one. Because the
sequences are usually too long to store in memory, an algorithm is used to
calculate the next number. There are also cases where you would like to go
back in the sequence and calculate the previous number in the sequence. Now,
for one of the most simple random generators, Fibonacci LFSRs, which is based on shift-registers and the exclusive or
operator, this is not very difficult. With these you have n bits and
to calculate the next bit you take the exclusive or operation from the most right bit and some other bit and
assign this to the most left bit after you have shifted all other bits one to
the right. In a sense, it is like adding another bit to the left of the
n and than shift the 'frame' of n bits one to the left. An
important property of the exclusive or operator, which is often denoted with
⊕, is that when a⊕b=c then
a=b⊕c. For this reason, when taking n bits,
it is possible to calculate the bit that was on the right, by taking the
exclusive or operation of the most left bit and the one other bit that was
involved. Thus by shifting the frame back to the right, you get the previous
value and can keep on doing this as long as you want. The following two
C expression can be used to calculate the next and the previous value in a
sequence defined by the constants A and B.
v = ((((1 << (B-1))-1) & v) << 1) | (1 & ((v >> (A-1)) ^ (v >> (B-1))));
v = (v >> 1) | ((1 & (v ^ (v >> A))) << (B-1));
For example, when A is 5 and B is 9, a sequence of 511 values of 9 bits are
produced. But with larger values for A and B, much larger sequences can be
produced.
Trees of random number generation
I have been thinking about dynamic procedural world
generation for a long time. The idea of procedural generation is already very old and it has been applied to many
computer games. I am not into computer games, although there are some games
with really beautifull worlds. The problem that I have with most computer
games, is the game aspect that requires you to fight or at least to achieve
some goal. I often just want to look around, investigate a world and just
experience the views. Many of the Windows scenic background make me want to
look around. If you want to wander around, you need a large world, and than it
is quite logical to make use of dynamic procedural generation, where you
generate the part of the world that is visible. The parts that are closer,
need to have more detail than those that are further away. The idea is to
change the level of
detail. At the highest level, you could divide the world into squares,
where to each square you assign a random number based on two bidirectional pseudo-random generator. That random number is then used
to generate the contents of the square. It could for example being used to
generate a height map using perlin noise. The idea is to use the random number as the seed (or
starting value) of another pseudo-random generator (perferable with a different
cycle length). To generate a realistic landscape, one might want to use a
number of overlapping perlin noise maps as explained in the video
Procedural Landmass
Generation (E01: Introduction) by Sebastian Lague. Each noise map has a higher frequency, but a lower
amplitute. For parts that are further away from the viewer, the noise maps with
a higher frequency and a lower amplitute are not visible. So, there is
actually no reason to calculate them. The idea is to subdivide the square in
smaller squares and only generate these noise maps for the nearby smaller
squares. Somehow, this means that for every smaller square, we need another
pseudo-random generator. In case of a noise map, it is possible to another
set of two bidirectional pseudo-random generators. But is we are generating
objects in the landscape, where the number of objects differ per square, this
is no longer easy, especially if the objects themselves (for example, a tree)
consists of objects that could have an even deeper level of detail (such as
the leaves). What we actually need, is a tree of pseudo-random generators,
where on each level we use a random number to seed an arbitrary number of other
random generators. One way of dealing with this, when using, for example, a
Fibonacci LFSR, is to perform an excluse-or operation with a successive
sequence before using it as a seed value for the next level random generator.
One could use another pseudo-random generator for this purpose.
23.3° Celsius
We have been seeing a lot of blue sky in the past week. Today, the temperature at Twenthe Airport went up to 23.3° Celsius, which
breaks the previous record of 22.7° for the temperature on this date in
1961. It is also the first day that temperatures are above 20°.
Too sneaky
I am getting the impression that the
SARS-CoV-2 virus is simply too sneaky to get it under control. Countries
all over the world have implemented strickt lock-down measures, but even
some countries that were succesful in getting the out-break under control,
such as South-Korea, are having problems getting their number below zero. I
also heard some report about that in some cases the virus can become active
again in someone who has been infected and tested negative afterwards. It also
seems that people who had only mild symptoms often do not have high antibody
levels, which might make them sensitive to being reinfected after some time.
It is also not clear how long imunity will remain for those who have been
infected.
Book
At 15:25:44, I bought the book Masters of Rietveld: Dutch Design Education
in the 21st Century edited by Mieke Gerritzen, written in English, and
published by All Media Foundation in 2008,
ISBN:9789081165525, from bookshop Broekhuis
for € 24.95. I already had considered to buy this book for many
years. An important reason to buy it now is to support the bookshop, because I
fear that they are going to a rough time due to much fewer people visiting the
shop.
Dune (2020 film)
In the past days, the first still shots for the upcoming Dune film were released in the article Behold Dune: An Exclusive Look at Timothée Chalamet, Zendaya,
Oscar Isaac, and More. What I am most afraid of is that visuals will be
more important than the story of the book, which is actually quite tragic: a
teenage boy, losing both parents (one through death, the other through
alienation), on a very lonely journey, falling into a trap he cannot escape.
It is only recently that I begin to understand
the deeper story that Frank Herbert, maybe partly unconsciously, wrote into the novel. Yes, on
the surface, the story reads a heroic adventure where the main character
defeates all his enemies, but on the deeper level, it is just the opposite.
This why so many people were deeply disappointed by its sequels, that make it
all the clear that the hero is no real hero. Brain Herbert, the elder son of Frank Herbert, said that he tried to
preserve his fathers heritage when reviewing the screenplay written by
Denis Villeneuve, Eric Roth, and Jon Spaihts, but I am afraid that he is not
in touch with the deeper story but only with the surface story. (I agree with
the author of The Irony of the Gom Jabbar, that: "Frank passed the Gom Jabbar, Brian
did not.") And I am afraid that this is also true for the directory,
Villeneuve, and the screenwriters. Denis Villeneuve already made some remarks
that this movie was going to be a 'Star Wars for adults'. And now again, he
makes Jessica into "warrior priestess" and jokes "It's better than 'space
nun.'" The latter characterization is probably more problematic than the first,
because Jessica was far from being a nun, as she is deeply in love with Leto
and the mother of Paul. Also the organization she is part of, is political, not
religious. I am afraid that it will be a long time before the literary
qualities of the novel will be recognized.
3%
Today, it was reported that with 3% of four thousands of people who donated
blood in the past weeks, antibodies against the SARS-CoV-2 virus were found. The donors are representative for the
population between 18 en 79 years, but not all regions are equally
represented. The number is expect to be between 2.5% and 3.5%. Based on these
figure, one could conclude that about half a milion people in the
Netherlands have had COVID-19. As of today, there are 29,214 people who
tested positive and 3,315 of these have died so far. Looking at the death
numbers from the national bureau of statistics it might be that the actual
number of people who have died might be twice as high. This would be in
accordance of a fatality rate of about one or two percent. It is clear that
the elderly are hit hardest and among them the men. Below a table by age with
in the first two columns the population in thousands (split in male and
female), in the third column the number of registered infections, in the fourth
column the number of people (having been) hospitalized, and in the last columns
the number of casualties.
pop. inf. hosp. cas.
m f m f
0-4 444 422 62 37 0
5-9 470 447 10 2 0
10-14 490 467 40 6 0
15-19 538 514 204 21 0
20-24 548 532 963 40 0
25-29 569 553 1313 84 3
30-34 543 515 1297 102 2
35-39 517 515 1115 147 4
40-44 510 619 1290 217 3
45-49 617 615 1885 436 8
50-54 642 635 2488 656 18 12
55-59 617 615 2762 874 38 15
60-64 546 551 2327 1009 66 30
65-69 492 501 1793 1091 138 65
70-74 445 468 2294 1404 236 131
75-79 283 324 2525 1351 433 196
80-84 181 241 2596 1004 450 281
85-89 92 159 2407 617 410 295
90-94 30 71 1397 183 146 220
95+ 6 20 429 27 30 84
Books
Today, I got the following books:
- A Sanskrit-English Dictionary written by Sir Monier Monier-Williams,
in English, and published by Clarendon Press in 1979,
ISBN:019864308X.
- Feeling Good: The New Mood Therapy written by David D. Burns in
English and published by HarperCollins in January 2009,
ISBN:9780380810338.
- Wolter's Wiskunde in je Pocket written by Erwin Broekema in Dutch
and published by Wolters-Noordhoff in 2004,
ISBN:9789001970727.
- The Number Devil: A Mathematical Adventure written by
Hans Magnus Enzensberger in English, published by Granta Books in 2006, and
translated by Michael Henry Heim from the German Der Zahlenteufel: Ein
Kopfkissenbuch für alle, die Anst vor der Mathematick haben,
ISBN:9781847080530.
- Een gesloten boek: autisme en emoties written by Peter Vermeulen in
Dutch and published by Acco in 2005,
ISBN:9789033459092.
- Brein bedriegt: als autisme niet op autisme lijkt written by Peter
Vermeulen in Dutch and published by Vlaamse Dienst Autisme in 1999,
ISBN:9789064451270
- Aspergirls: een wegwijzer voor meisjes en vrouwen met het syndroom van
Asperger written by Rudy Simone in Dutch and published by Hogrefe in
2010, ISBN:9789079729289.
- Waarneming en zintuiglijke ervaringen bij mensen met autisme en
aspergersyndroom written by Olga Bogdashina in Dutch and published by
Garant in 2004, ISBN:9789044115376.
- Waarom niet iedereen mij leuk hoeft te vinden written by Bert van
Dijk in Dutch and published by Thema in 2009,
ISBN:9789058715913.
April 28
In the evening, our government announced the measures with respect to
COVID-19 for the periode after April 28 as
the had promised to do when they announced the intelligent lock-down. Some of
the restrictions will be lifted (mainly with respect to primary school
children) and some have been extended (mainly with respect to public events
that require a permit). They did announce that testing would now also become
available for teachers as it has been available for caregivers. The idea to
losen restrictions for young children is that they according to the RIVM there
is not much evidence that they do spread the virus. Today, the RIVM is some
other publication, did state (translated from Dutch by me): "Analysis of
clusters of patients shows that spreading also takes place by persons who do
not (yet) have any complaints or symptoms." On their website, the still state
that there is no evidence for this. And somewhere else they state that
although it might be possible, it is still unclear to which extend this
constributes to the spread of the virus.
Earlier this week, Professor Marc Bonten complained that the available testing capacity is
not optiomal used and that this mainly due to bureaucracy. He remarked that it
usually takes four to five days before a test result is reported to the
person who was tested. It seems that it is much easier for the government to
issue measures for other than to change their own organization. Also the
process for developing an app, has been rahter chaotic. The governments asked
groups of experts to evaluate proposals, but in the resulting shortlist of
seven apps, there were some which violated privacy. The groups also complained
that they were not given any guidelines on how to evaluate the proposals.
Book
At 19:08, I collected the book AKI eindexamen fotografie 2001 with a
preface by Rutger Ten Broeke in Dutch and published by AKI in 2001 from a
private person. I paid € 4.50 for the book.
Book
At 16:45:53, I bought the book De Voorstelling: Nederlandse kunst in het
Stedelijk Paleis written by Rudi Fuchs and Lien Heyting in Dutch and
published by Stedelijk Museum Amsterdam in 2000,
ISBN:9789076588155, from thrift store Het Goed
for € 2.25.
Groot Brunink
Today is Koningsdag,
a national holiday to celebrate the birthday of Willem-Alexander of the Netherlands, our king. Due to COVID-19 many of the traditional celebrations have been cancelled. Conny took me on a biking/walking trip to the Groot Brunink estate. We
biked to the start of the road called Weustinkhoekweg and parked our bikes
there. We walked around for about one and half hour and also took a short
break during which Conny took a
picture of me. I really enjoyed the beautiful landscape, which is so
typical for the area where we live. It really felt like being on a holiday.
When biking home, we took a little detour, and Conny showed me
the
Berktepaal, a stone that marks the border between the two 'markes' of
Usselo and Buurse. A 'marke'
is a medieval collective of larger farmers who jointly regulated the management
and use of their common land. The word marke (related to the English 'mark') is
also used to indicate the area that belongs to a village. At home, I read about
the history of these border poles and learned some interesting facts about the
life as it was here in the past.
Small chestnut tree
Yesterday afternoon, Annabel noted that the
small chestnut tree, that I feared had
died, was growing again. It has some bright
leaves. The stem seems thicker and has a strange twist a few centimeters above
the ground. This is an interesting development. This afternoon, I took
a picture, which is displayed
on the right.
This months interesting links
Home
| March 2020
| May 2020
| Random memories