Today had to recover my steps from Friday: I need some of the code examples I used on Friday to do in the next chapter … guess who hadn’t saved them? Not a major concern, as this acted as quite a good revision exercise, refreshing my mind and eyes as to what I had seen last week.
July 31, 2006
July 28, 2006
Friday is a schoolday …
… and today we went through:
- classes and objects
- classes and functions
- classes and methods
- sets of objects
July 27, 2006
Notes from meeting with Will, Thu 27-Jul-06 (TC) …
Plan of action is effectively
- spend next 2 weeks learning Python
- look to complete “following” simulation
- once done, turn attention to reading once more, looking at how drafting occurs
Python is the language I’m currently learning, but hope to use Jython later on, if suitable, or migrate to Java, C#, etc.
Next meeting: 2-Aug-06, 11am, Jon to call Will (TC)
July 26, 2006
Weekly summary, w/c 24-Jul …
Started to take the time out to teach myself OOP via Python.
Monday, Tuesday, Python days …
Spent this week (to date) starting to teach myself Python properly, via the use of the “How to think like a computer scientist: Learning with Python”. Forgot to actually track what I’m doing via the blog, so a quick overview of what I’ve done so far:
- programming overview
- variables, expressions and statements
- functions
- conditionals and recursion
- functions returning values
- iteration
- strings
- lists
Most of the above has proven to be a refresher of what I know, or at least another way of looking at things, so have been able to rattle along pretty quickly. Different flavours of data types are next.
July 20, 2006
Weekly summary w/c 17-Jul-06 …
This week I’ve been focusing on producing a leader/follower model, where you have a leader moving along a set path, and agents following the leader across the screen.
However, through this I’ve realised that my coding skills are not up to the task, so I need to take some time to teach myself how to code. I’ve found a Python book on the internet, so I’m going to spend ~3weeks working through it. This may be a big chunk of time (see today’s blog posting), but should prove rewarding over time — the ability to use/control the tools earlier on should prove very useful.
A programming dilemma …
I fully realise that through this study, I need to learn OO programming, so that I can autonomous agents effectively doing their own thing, and I can observe what they are doing. As such, I’ve reached the conclusion that my skills are no where close to the level they need to be in OO — I keep thinking about how to do things procedurally, which is only going to hurt my in the long run.
As such, I’m going to focus energies entirely on a Python crash-course, taking (I think) about 3 weeks to learn. This may sound a big chunk of time, but I think will prove very prudent throughout the course of the research project — it would make much more sense to have a good control over the tools, as opposed to shoe-horning things in whilst I go.
(NB do actually understand most of the logic on what to do: the semantics I understnad, I just need to learn a language to implement)
July 19, 2006
Wednesday and following basics …
Again I attempted to simulate a group of individuals following a single leader … but whilst battling with the OOP side of things, realised I didn’t actually know how to go about’s doing this!! As such, ended up in Excel going through the basics of the mathematics and logic. Got the first stage sorted today, but aiming to take this further tomorrow.
Getting annoyed with the time restricitons around this: feel like I would achieve so much if I had a full two weeks to focus, say , entirely on the programming. Grrr!
July 18, 2006
A number of updates for Tuesday …
Been a bit slack over the past few days, so a quick update covering Sat — Tue: turned my attention back to programming, and trying to get “sheep” agents to follow the leader in front of them (be interesting to see if any oscillations occur as a result).
Got the basics set up: a wireframe box in space, with some coloured spheres acting as leader and follower. I got the leader to move continuously along a sine curve, so giving something to follow. I’m now trying to work out how to get the followers to move in the direction of the leader. From what I can see, it would be best to evaluate where the agent is currently cf. the leader; work out the direction of the leader at the moment; move one step in that direction; repeat. Hoping to see if this works over the next few days.
However, realised that if you had >1 follower, and the followers are following the nearest follower (i.e. to form a line behind the leader), how would you work out which agent to follow? Realised that the easiest way to do this is scan for all follower agents, and work out the distance between them and the individual by Pythagorus, selecting the one that is nearest as the one to follow.