Perse Studio

Independent-learning super-curriculum projects: reading, research and ideas shared by Perse students

Advent Of Code Programming Problems

Daniel C, Y9

After solving day 13 and day 17, of this year’s Advent Of Code programming problems (, I thought it would be nice to create a visualization of my two solutions. For Day 13 this shows minecarts moving around and crashing. I obviously had to slow the calculation thread down though (added 20ms delay per move), otherwise it would have been way too fast to see.

To achieve these visualisations, I used javax.swing.JFrame classes with Java programming. Each step of the calculation I just called Thread.sleep(20); and painted the 2D array of tracks to the screen. I downloaded a free recording software and cropped the screen to fit the JFrame, then recorded and exported as an mp4 video.

For Day 17 with the flowing water water, I used white for sand, black for clay, solid blue for settled water and dotted/flowing blue for flowing water.














​I hope you enjoy them both!


Nicholas R. Y11

Berlin is noticeably a city in a struggle with its own past. This is unsurprising, given its tumultuous recent history – from the Kaisers, through a brief period of fragile democracy, to Hitler and the Third Reich, and ultimately a split into East and West. However, what is interesting – and surprising, perhaps – is the effect that this has on the modern city.

A Berliner going about his or her daily business will likely pass one of the many memorials commemorating the horrors of the Nazi régime, walk past DDR- era apartment blocks, and step over the line of bricks set into the roads which marks the line of the Berlin wall. In short, History permeates every corner of Berlin; it is a city of echoes of the past. The ‘Memorial to the Murdered Jews of Europe’ (or ‘Holocaust Memorial’) is a good example of this. Situated near the Tiergarten, historic hunting ground of the Brandenburg Electors, and surrounded by modern high-rise buildings, this mass of 2,711 concrete stelae has an oppressive and inhuman feel. The deep shade and grey monotony is representative of many of Berlin’s monuments – they exalt despair on the part of the viewer. Much of the commemoration, such as the ‘Holocaust Memorial’ is a form of conceptual artwork based on architecture, experience and collective emotion. It is presentation of History with an agenda and often without much information – it attempts to tell a sort of emotional history, rather than an intellectual one, and it exudes a contemplative solemnity.

Continue reading

Collatz Sequence using Assembly Language on Little Man Computer

Joshua S, Y10

The Collatz Sequence starts with any positive number and either halves it if it is even or triples it and adds one if it is odd, continuing until it reaches 1 after which it stops. The unproven theory says that for all positive integers this sequence should eventually reach one.

When I first looked at the collatz sequence problem for purposes of assembly language, the first thing I did was decompose the required algorithm into its component parts; an even/odd checker, a part that would triple a number and add 1, a part that would halve a number and a part that would stop the algorithm once one was reached. I then realised that it was nowhere near as hard as it seemed – each of the four main elements were fairly simple, the hardest being the division. Mr Gwilt demonstrated the method to achieve the odd/even checker in class. The triple and add one was easy – simply add the number to itself twice and add one, although this exact code isn’t demonstrated in my code below, as I also integrated the stop code into the odd function*. The division, however, required a more complicated algorithm, and two variables. It worked by loading the value of x and storing it as y​, then looping code that would load y, subtract one, and store the new value. It would then undergo a check in which y was doubled and then x​ subtracted – if y was half of x​, the program would divert to another label called output, which would output x​ and return to loop​, else it would continue looping until it got there.

* by subtracting one from the accumulator (which I had just loaded with the current value of x, the variable used to hold the current term) then using the BRZ command, I could check if x was currently 1, then divert to the stop code if it was. Since I had subtracted one, I had to add two to get the triple-add-one effect, and store a new x.

You can try out Little Man Computer (by Peter Higginson) online here:

NumberBlocks : designing a numbers puzzle game

Jem B, Y9

I decided to make a puzzle in the Japanese style (simple rules, no language requirements) and I came up with the below. I then wrote a program to solve these puzzles and also generate new ones.

The rules

The grid given has numbers and some boundaries between them. The goal is to add more boundaries to enclose blocks of numbers, such that each block contains the numbers from 1 to the size of the block: e.g. a size-1 block contains the number 1, a size-2 block contains the numbers 1 and 2, etc. Blocks may be of any size or shape.

Example puzzle         The solution







Continue reading

Tic Tac Toe in Python

Liam K, Y7

I came up with this idea because I was trying to think of a game that would work in a text based environment. It took around 2 hours to complete with it first being without functions but that didn’t work because it would need to use certain code over and over again making it too long and tricky. The AI itself for the one player game took around an hour to complete because of its algorithms that make it work, most of them were simple, but there were a lot. I think that the AI is impossible to beat, but see if you can beat it!

Play here:



By Sung P – Y9

Tanks played a major role in the First World War. When we think of tanks, we this of huge machines that can blow things up and also a transport which is well armoured.

The word ‘tank’ literally means ‘land vessel’. Winston Churchill donated/gave a huge amount of money for the funding of tanks. But the first use of tanks wasn’t until The Battle of the Somme. They were mainly successful but there were pros and cons.

Continue reading