Our Journey: Quantum Game Hackathon (QOyun’2020)

How we became the winners?

Onur Tuna
8 min readFeb 14, 2021

The subtitle might be misunderstood. So let me start the article by saying this is not an advice post. In this post, I would love to tell about the two days we spent with my friends. This was the first hackathon I have ever joined. I had so much fun. I asked myself why I haven’t joined a hackathon before. It felt like always tiring. You don’t know before entering. It was so much fun. There is a lot to tell. So let’s get to the journey now.

The Team

From top to bottom: Me, Imre, Aybuke, Kaan

We were a team of four. Two for quantum part, Imre and Kaan. Aybuke was the designer, and I was the software developer. I have been friends with Imre but didn’t know Kaan and Aybuke until the event. Imre and Kaan have been friends from the office. Aybuke was the only stranger between us.

The event started at 08:00 pm on Friday. The special topic we needed to focus on has been introduced at the start of the event. The topic was Chaos.

As you can understand from the name of the event, it was a quantum mechanics inspired game development competition. The special topic was to involve chaos. What does chaos mean?

Chaos

Think. Physics is the mathematical explanation of the nature. It finds mathematical explanations to the real world facts. Physics is not philosophy.

So, think. We have a rolling ball on the table. Physics aims to say “the ball is going to be there in the 3rd second”. We call it determinism if we can say it confidently.

Now, think, you have a mug, full of coffee in it. You throw the coffee to the ground. Could you draw the shape of the coffee on the ground before throwing it? No! There are so many parameters affecting the last shape of the coffee on the ground. This is chaos. How do physicists solve the problem? They don’t. They utilize statistics here. You can draw a heat map. Places with the highest probability of coffee being are the deepest red. Places with the lowest probability of being are the lightest red. The places that shouldn’t be at all are not red. We call it a heat map. This comes with randomness. But not an ignorant randomness.

Let’s get back to the hackathon

The game idea was something else before the event started, I don’t remember. I was responsible to develop the game inside the boundaries of my abilities. I was waiting for the last idea. I haven’t developed any games before. It was a good idea to learn some Unity in that event. My Airpods Pros have run out of charge while they were discussing about the game idea. I have put them on charge and said I’d like to take a nap on the sofa until they’re full. I fell asleep.

When I woke up the next day, Saturday, asked the team what the last idea was? They started to explain me the game. I have listened the idea and seen that I don’t need to use Unity for that game. I have said I can do it by a casual iOS development.

Imre has said “we thought so”.

I have started to develop the game. Imre and Kaan started to work on the improvement of the idea. Aybuke started to design. It was hard to develop the app in parallel to design. However, we have handled in some way, a harder one.

Anyways, the first idea was to build a grid, like the one in Sudoku. The player would apply a quantum gate on a quantum sphere. S/he would change the quantum state by applying the gates on the spheres. The player would have a measurement target. S/he would try to achieve the measurement target by applying the gates on the spheres.

We spent all Saturday working a little independently and from time to time talking about the way the game was going. I, at first, developed a game with the grids slightly different than the actual design. It wasn’t a very important stuff to care about. The important thing was the functionality. I didn’t know anything about neither the quantum gates nor the quantum spheres.

Imre and Kaan said they’re going to provide all the functionality as a pseudo code to me. I have started to wait and decided to take a little nap on the sofa. I fell asleep.

I have tried to reach out the team Sunday morning. However, no one responded. Because everyone fell asleep except me 🤓

I have noticed that Imre sent an email including the pseudo code and I have implemented it in Swift until everyone is up. The logic was super simple, still, I didn’t know anything about the quantum stuff.

The only thing I know about Quantum Computation

The classical computation relies on logic gates manufactured using semiconductors. The state of a gate is identified based on the voltage between the diodes. Those gates are AND, OR, XOR, etc. All the computational stuff can be handled by linking different logic gates together. We call it a logic circuit. However, we are living in the limits of the hardware power of classical computation.

Anyways… In days of yore, some scientists thought of that the computation can be handled in different ways. One of them is to utilize quantum properties of atoms. We, actually, don’t need anything but discrete mathematics. As long as the the tool is affordable we don’t need to rely on semiconductors.

So, today, there are different types of quantum gates such as Pauli-X (X), Pauli-Y (Y), pauli-Z (Z), Hadamard (H), etc. The quantum computation logic also utilizes the quantum mechanical phenomenons such as superposition, entanglement, etc. The overall idea makes computation way much faster than the classical computation. It’s also applicable today. Quantum programming is real!

Sunday

The clock was ticking. According to the timeline of the hackathon, we had to finish everything — coding and presentation before 03:00 pm. When everyone attended the meeting in Sunday noon at around 11:00 pm, we should have decided the way to end the work.

Things to do in a hurry:

  • Finish the code and produce a ready-to-use app. (Onur)
  • Create game-play movie. (Onur)
  • Prepare the presentation. (Imre, Kaan)
  • Prepare the needed design stuff for all of us. (Aybuke)
  • Win the Kahoot game. (All of us)

The final design and and the game I have developed was slightly different than each other. The first thing was to make them fit. We, somehow, could manage to find workarounds for this purpose.

There was a buggy state that the player was not able to win. Kaan solved it by making up a brand new Quantum Gate called Pi.

I have tried to finish the game while the others were working on their load. After making the game playable, I started to make a gameplay video. I went to the kitchen while the iMovie was rendering and got a beer.

I poured the beer on my computer.

After the first shock I managed to get the computer upside down. However, it did not seem to finish the rendering soon. The code was on my local. I decided to send it to my email. I was lucky that I had a second computer which have been provided by the company I work for.

I don’t like to mix work and my life. I don’t even enter my personal gmail on my work computer. However, this case was an exception. I have downloaded the code and the iMovie in the work computer. Lastly, I have informed the team that I have poured beer on my computer. Naturally they have been shocked. I told them I have managed the fact and was waiting for the video rendering to be finished.

I also could manage uploading the app to the TestFlight.

03:00 pm

We were all done by the deadline. It was time to wait for the result while playing Kahoot. No one in the team could win.

After Kahoot, the closing of the hackathon started. I didn’t know what the other teams developed until that moment. We were the second team to present the game. There were many good ideas as well as bad ideas.

The moderator started to reveal the ranking with the third team. Meanwhile I went to the kitchen. Kaan sent a message to our WhatsApp group, “I wonder?”.

Right after, our team was announced as the winner.

BTW, I have taken the shot from the computer I have poured beer on. The computer still works like crazy.

It was a great weekend.

It’s great to work on something with people you have never done something with before. To be honest, this event made me miss my university years. I learned new things, met new people. It was great to compete in a competition which you were there only for fun.

If you would like to give a try to our game:

Remember that, if you download the version 1.0, it’s the app of that night. I mean, workarounds, workarounds, workarounds, …

We have prepared a road map to improve it. The upcoming versions are planned to be better.

--

--