## The golden ratio

I find maths work a lot easier if I use the printed course books rather than the pdf versions, so for the past few weeks I’ve been eagerly awaiting the delivery of my MS221 materials. However, last night I finally snapped and printed out the first two sections of Chapter A1 from the pdf copy, and today I’ve been working my way through Section 1, which is about the golden ratio.

It’s been fantastic so far – a really fascinating topic, and a very compelling start to the course. The golden ratio is introduced through a rectangle problem:

The Rectangle Problem
Suppose that a rectangle has a square removed from one end, leaving a rectangle the same shape as the original rectangle. What is the ratio of the lengths of the sides of the original rectangle?

## Heuristics drive Rob slowly mad

This week I have mostly been bashing my head against M366 TMA01 Q4, the bit about choosing a good heuristic. It took me quite a while just to get my head around what the question is actually asking for, let alone actually answering it! So now after three days of going around and around in circles trying to figure out how to choose a heuristic for this problem, I’ve finally got one – it’s probably not a particularly good one, but hopefully it’s better than the example “poor” heuristic from the previous subsection, and in any case it’s very prettily laid out using Word’s Equation Editor tool, so I’m happy.

I’ve been able to move on to the next bit of the question, at last, which involves heavy use of NetLogo’s BehaviourSpace. I quite enjoyed the BehaviourSpace bit of the M366 Software Guide exercises – it’s great being able to get the simulation data in csv format, and hence into Excel, which feels very much like my home turf since I spend most of my time at work producing spreadsheets. It feels a bit weird to be using Excel stuff for something OU-related, but overall I’m really glad we’re doing this kind of statistical work; I like the emphasis on running simulations several times to build up a reliable picture of the likely outcome, and to be honest, anything that encourages people to use or develop their spreadsheet skills is a good thing in my book!

## I have search algorithms coming out of my ears

I finished Unit 2 of M366 Block 2 yesterday, so I spent most of this afternoon writing up my notes on search algorithms and heuristics. And there were tons of them! I didn’t appreciate just how many topics were covered in Unit 2 until I started to summarise them in my M366 tiddlywiki.

One concept that it took me a while to get the hang of was alpha-beta pruning. There’s a great flash demonstration of alpha-beta pruning on the M366 course website (unfortunately only available to M366 students), which helped a lot; but oddly, the thing helped the most was going through the pseudocode example from the course text, rewriting it slightly so that it had a more familiar structure, and adding comments to each line describing what the code was doing. Once I’d done that, and I finally got my head around the recursive back-and-forth calling of the `ValueOfMax` and `ValueOfMin` functions, the exercises in Unit 2 actually made some kind of sense!

## M257 TMA01 returned!

I’m really happy to have this TMA back at last, mainly because it means Alex won’t have to put up with me grumbling eleventy-billion times per day about how much I want to see my grade and feedback. I got 95% for this one, which is a little bit worse than the mark I got for M255 TMA01 (96%) and so is a tiny bit disappointing, but overall I’m very happy with the score.

I felt very detached when I submitted TMA01 via the eTMA system, which was quite an unpleasant feeling; since there had been a few weeks between finishing the assignment and actually submitting it, I felt a bit like I didn’t really know what I was submitting (and had to try very hard not to keep unzipping the file and having a look, just to make sure it was all there!). I do keep a record on my study calendar of which questions I’ve finished for each TMA, so I knew I must have fully finished the assignment, but it was still unsettling not to have it fresh in my mind.

So I think for TMA03, and certainly for the assignments in M366 and MS221, I’m going to try to leave the TMA-writing stage until closer to the cut-off date. I definitely don’t want to be feeling unsettled and anxious about three different TMAs at once!

## M366 Block 2 computer activities

I’ve been finding the computer activities in Block 2 Unit 2 quite tricky, to the extent that I was beginning to think I’d missed one of the introductory exercises in the Software Guide! Unfortunately I hadn’t missed any, so something must have gone awry with my understanding of how the search algorithms have been implemented in these activities.

I don’t think it’s the NetLogo code itself that’s my problem, I think it’s the details of these particular route-finding programs; oddly, I had no trouble doing the beam-search code in Ex 2.5, but the solution for the previous activities (the depth-limit and iterative-deepening ones) completely eluded me. I’ll probably need to go back through the code for Ex 2.3-2.9, along with the NetLogo user manual, until I can make sense of it. (I guess I know what I’m doing this weekend!)

Nevertheless, I’m enjoying Block 2 a lot more than Block 1, particularly the discussion of various different search algorithms and their advantages/disadvantages. I’m particularly happy to be learning about search trees and tree traversal again, since the Binary Trees unit was one of my favourite parts of M263 (although I liked the bit involving parse trees even more).

Hopefully I’ll be able to get this section finished by the end of this weekend, and then it’s on to the bit about adversarial search and games. I don’t know much about the topic, but it sounds interesting, especially if we’ll be looking at problems where two agents have to react to each others’ moves – and in any case, it’ll certainly be nice to have a break from all the “find the shortest route from Exeter to Norwich/Lincoln/Shrewsbury” problems…

## Getting started with M366 TMA01

As I’d hoped, the course website for M366 has opened today, and so I’ve been able to download the TMA01 document and get started on Question 1. This first question is all about describing concepts from the Block 1, so it feels very much like jumping in at the deep end! I’m still not sure whether I’m even thinking in the right way for this course, let alone writing in the right way, but I suppose I won’t know for sure until I get my first assignment feedback (which won’t be for quite some time, since the cut-off date for this is 14/04/09).

On the other hand, I should be able to get a rough idea of how good or bad my understanding of these topics is from the course forums, which are already open. I’m generally a bit reluctant to post on FirstClass forums, but I do quite enjoy reading along with the discussions that go on there. Except during exam revision time, when everything gets a bit frantic!

I’m having some trouble putting together a study schedule now that I’ve got three courses on the go. I’ve had a similar course-load before, back in the summer of 2008, but since those were all programming courses it was fairly easy to organise my study sessions; everything seemed to take roughly the same amount of time, so it was a very regular, steady process. This time around, I’ve got a programming course (M257), a maths course (MS221) and a weird wordy course (M366), so I feel like I’m trying to tessellate three very different shapes – I’m sure they’ll fit together, it’s just a question of how!

## Further into the strange and alien world of M366

M366 is proving to be a very different experience to the computing courses I’ve done before, and in some ways I’m feeling out of my element. It’s not that the material is difficult or impenetrable, but that I’m not exactly sure what to do with it. My previous computing courses were mainly about doing and making stuff, but M366 seems to be about understanding and explaining things; for this reason, my unease with the course is giving me a creeping fear that I really am just an oompa-loompa of computing.

## First impressions of M366

Unit 1 of M366, featuring some lovely paper wasps

The course materials for M366: Natural and artificial intelligence arrived yesterday, so I’ve finally got my hands on my very first Level 3 textbooks! I’ve read through the first 3 sections of Unit 1, and at the moment I’ve got mixed feelings about the course…

I really enjoyed the introductory NetLogo activities, especially using the BehaviourSpace tool to run a simulation multiple times and output the results to a csv file. I’m really looking forward to making my own simulations, and I’ll be interested to see if we do any kind of statistical analysis of the output of our programs.

I also quite enjoyed the section about Enlightenment automata, particular Vaucanson’s Duck, a copper duck-shaped automaton that appeared to eat, digest and defecate. The course text says that the “digestion” was the result of a chemical plant inside the automaton, but rather disappointingly the Wikipedia page says that this wasn’t the case. I’m not sure who to believe!