Drawing in 3D

Last Wednesday Holly gave a presentation on her part II project.

The projects goal is to ease the creation and development of 3D models. After providing us with multiple statistics about long it can take to produce a high quality model (16 hours +), Holly went on to demonstrate how her project works, what outcomes can be achieved with it, and how it tackles the problem of the long durations needed to craft detailed models.

The idea behind the project, is to allow an artist to draw a shape in 2D, and then have this 2D shape crafted into an inflated 3D model. The results were honestly quite spectacular, with an example of a simple 2D fish being converted into a respectable 3D model of a fish (shown below).

 

Drawing in 3D

To achieve the results seen above, Holly uses various techniques published in papers that show how some continuous calculations can be transformed into discrete calculations, and therefore more easily computed.

Drawing in 3D

With the ability to edit the curvature of the model produced (shown above), as well as having fixed “heights” in the model to give more definition, the project should result in an easy, and very quick way of creating mock-up models for use in a wide range of industries.

 

 

How to give a presentation (and give feedback to others)

Over the upcoming weeks we’ll be having presentations from the third year students. The format is that they will speak for 30 minutes and then they’ll sit down and we’ll give them feedback on how they presented for 30 minutes.

To give us some basis for discussion I gave a talk this week on “What makes a good talk good?”.

The majority of the talk was based around this TED talk:

We paused the video at appropriate points and talked about the good things the speaker is doing to engage the audience and get the message across. If you are watching the video watch out for him repeatedly refreshing the main points and using the Rule of Three. There are so many things going on in this video that we spent 40 minutes talking about the first 10 minutes of the talk.

After watching the video I talked about some other techniques not visible in the talk (use of slides for example) and how we might structure our thinking when trying to give feedback to others.

I’m looking forward to seeing the presentations from the third years in the following weeks.

Wednesday Meeting SpaceChem Challenge

Another week flew by in Cambridge and before we knew it we were back in the top floor of CC meeting again with our fellow Queens’ Computer Scientists. Our Wednesday sessions are a chance to reconvene and participate in whatever Andy has in store for us! After a couple of weeks of presentations, both inspiring and daunting for myself as a first year, we knew we would be doing something a little different this time around…

IMG_20141029_190412

We settled down in the pairs, each pair with a laptop, soon to discover the purpose behind bringing such devices. Andy gave us a URL and off we started!

SpaceChem, a familiar name to some prior enthusiasts, is a puzzle game which uses a visual programming language to allow the user to tackle various chemistry related challenges.

In its simplest terms, the aim of the game is to produce a certain number of each required product molecule by controlling the movements of the input molecules. As you can see in the GIF above, the reactor can look rather complicated when in use, which is why you need to be able to think ahead when designing your solution. One of the cooler features of the game is seeing how your solutions compare to those of actual other players.

Why might we be playing computer games in term time when we supposedly have a gazillion other things to be getting on with? Well there’s a reason behind the gaming, Andy reassures us. There are a few applications of the skills that the software teaches to our own courses.

Besides the obvious programming and solution building connections, there are some concepts that it helps to bring out in our CompSci brains. In particular, an understanding of concurrency is required to complete later levels. As you may be able to see in the GIF above, these harder levels require multiple molecules to be bonded together. This means you have to ensure that the molecules moving along the different paths arrive together at the same time in order to bond. You can use sync points to make certain molecules wait for the other ones to catch up, to fine-tune process so the required ones join together at the right place and at the right time. This is in a similar vein to parallel processing which is an important part of Computer Science. SpaceChem gave us a chance to visualise this idea and put it into practice.

IMG_20141029_190417

And of course, to make the session extra special we were given prizes for showing Andy something ‘impressive’.  Our pair created a solution which used every space on the grid to get earn some well-appreciated caramel bites.

IMG_20141029_190358 IMG_20141029_190424

Grateful thanks to Zach@SpaceChem for allowing us to run the session.

Multiplying two digit numbers

We were chatting at dinner the other day about mental arithmetic and Navid had a neat trick for multiplying numbers in his head.   He’s written it out below.

Mentally multiplying two digit numbers is difficult for the majority of people. This is probably due to our limited working memory overflowing when we try to store the partial products, leading to errors.

In many cases, I use a trick to simplify the problem, which is the subject of this blog post. It requires a bit of investment, but lets us compute products such as 84*78 both accurately and (in due time) quickly.

 

Theory

This trick works for a * b when a + b is even, that is to say either a and b are both even or both odd, for example 65*43 and 88*78. Furthermore, it works best when a and b are close together, but as your proficiency increases this becomes less important.

The essence of the trick is in the difference of two squares, namely, we want to write a * b =       (c + d) * (c – d) = c^2 – d^2                  

We quickly find that. c = (a + b) / 2 and d =|a – b| / 2

In other words c is the average of a and b, whereas d is the difference between the average and a or b. Note that the condition that a + b is even ensures that both c and d are integers.

You are probably wondering what the point of this complication is. Well, in many cases computing c^2 – d^2 is easier than working out a * b. For example, take 43*57, it is easy to see their average is 50 and the difference is 7. Hence, the product reduces to 502 – 72 = 2500 – 49 = 2451. Try it out on the following examples:

a) 66*62                             b) 98*84                             c) 39*33                             d) 44*76

 

Tips and Conclusion

After doing a few problems you will find that most of the time d is small enough to recall d^2 from memory. The trickier part is calculating c^2, fortunately, we can use the fact                 (x + y)^2 = x^2 + 2xy + y^2 to aid us. For example, writing 82 = 80 + 2 we find that 822 = 802 + 2*2*80 + 4 = 6400 + 324 = 6724. Personally, I found that this speedy computation of c^2, removed the major bottleneck from the method.

Some practice is required but soon you will be able to multiply the majority of numbers of this form in under ten seconds.

Queens’ Academic Saturday on “Understanding Intelligence”

Last Saturday we all got invited to talk from Queens’ Computer Science graduate Demis Hassabis who matriculated here in 1994. Under the title ‘Understanding Intelligence’ he talked about his latest startup DeepMind (recently bought by Google), as well as what else he has been up to since graduating from Queens’.

Demis said he had always been interested in Artificial Intelligence. Before he came to Queens’ he created many computer games, most famously Theme Park (1994), which all had a strong foundation of AI built into them. He continued this after graduating from Queens’ with game titles such as Black & White (2001) and Republic: The Revolution (2003) until he in 2005 went to UCL to do a PhD in Cognitive Neuroscience. He told us that doing a degree in Neuroscience was crucial to achieve his in-depth understanding of how the brain works and how he later could use this knowledge to found DeepMind. He referred to the quote:

“What I cannot create, I do not understand.” 

- Richard Feynman (1988)

DeepMind

In 2011 Demis co-founded a company called DeepMind with the idea to create ‘an Apollo programme for artificial intelligence’.  The company was successful in attracting the best AI researches in the world and very impressively, only 3 years later, Google bought the company.

In difference to many others, instead of focussing on a very narrow task, DeepMind aimed to develop ‘General-purpose learning algorithms’ which would have a very broad range of applications. He outlined a sketch of how these works by showing the agent model:

  1. The agent receives perceptions from environment through a set of sensors
  2. The agent interprets these and decides on an what action to take
  3. The agent performs the action and goes back to (1)

While step 1 and 3 are easy to achieve, step 2 is where advanced artificial intelligence is needed and this is what DeepMind has mastered. Demis showed some demos of how their software was able to, only by watching the screen and being able to control the joystick, win any of the old Atari games. Because they had made their learning algorithm as general as possible, it didn’t really matter what games the software was playing, it would quickly learn what optimal strategies to use and become better than any human player. All they had to tell the algorithm was that a high score was good.

Demis finished his talk by answering questions on anything from self-driving cars to how a future with advanced artificial intelligence would look like.

I found the talk very interesting as I’m currently writing my final dissertation (Part II of the Computer Science course) within the field of AI and machine learning. You can read more about that project here.

Part II students’ summers

This week’s meeting of the Queens’ CompSci students focused on what our part II students did over summer (that being the summer between years 2 & 3 of the undergraduate course).A slide from Holly's talk about an internship at Facebook

Many secured a placement for an internship. This lasted about 3 months with a variety of companies including Facebook, Amazon TV and Palantir, taking place in California, London, Russia, Denmark and more. These students gained experience in industry as well as with new toolsets, and enjoyed many of the perks of working with huge companies – Facebook’s food being especially recommended!A slide from Jeppe's talk about an internship with Palentir

One common recommendation from students was to apply early in the year for internships – interviews can start around November, and if places fill up before they process your application you can find it hard to secure something for the summer. Queens’ starts C.V. help early in the year to aid you in this. Cambridge also offers summer projects in the Computer Laboratory to build on skills learnt in the year.

Other students chose to spend their summer on independent learning – Mistral devoted a large part of his time to researching malware and computer security, for instance. Meanwhile, Jake developed an iOS app for his location-based social network company (a joint project with other students), and also worked on his YouTube series (which is featured often on this blog) and web development.

Finally, the part II students held a short panel where other students could ask them questions, followed by a great formal dinner.

Meet the supervisors – Raphaël Proust

One of our new supervisors this term is Raphaël who will be supervising the Semantics course in the second year.  He’s written a short introduction about himself:

Raphaël is a PhD student. His research focuses on automatic memory management and intermediate representations for compilers. Blending these topics together leads to compile-time garbage collection. And once you start down that road you start wondering what is “garbage” and using “fix-point” as a verb and wondering why people even bother writing programs at all. Maybe that’s the road to a PhD… Hopefully.

Before Cambridge, Raphaël studied in ÉNS Cachan at the Université Rennes 1 and, before that, at the Université Paris 7 Denis Diderot. For as long as he has been able to select them on his own, he has always picked courses that try to fill a gap between the theory and the practice. Compilers are a good fit for that: modern compilers are a blend of a lot of theory and various engineering feats.