Procedural Worlds - A Beginning

So, in a bid to fill my boredom this evening I started a little 3d programming project. The final aim is the creation of a procedural world type thing with trees and rivers etc.

Here is where I currently am at: Badly textured trees and all:

qitworld

I’ll see how far I get and post any other progress. For more procedural stuff see Dan North’s blog thing, which he seldom updates.

Visualising Memory Usage

I have finally handed in my dissertation so in the brief period between handing it in and starting to revise for exams, I thought I would work on a little personal project. Currently it is in the very early stages, and I don’t think it will really get passed the prototyping stage. Nevertheless, here is the progress after ~4 hours work.

Current Prototype

Current Prototype

It currently works quite well on my test system, most of the blocks are too small to see. The main block is QtCreator, with the other visible blocks representing Firefox and the app itself. The other small blocks mostly represent background processes.

If Medicine Was Taught Like Computer Science

I am currently one week into my last semester of my Computer Science degree. Having now attended at least one lecture of every module I have a pretty good idea of the rest of my course.

Over the last 2 and a half years I have made a variety of observations about the courses, lectures and general atmosphere of the course and now feel I can pass some advice onto those wanting to study Computer Science. The best way I can think of doing this is in an anaolgy.

So here I go…If Medicine Was Taught Like My Computer Science Course

Year 1

  • Body Basics - DNA, Cells, Diffusion, Osmosis… (I was never any good at biology…)
  • Surgery 101 - Using a scalpel to cut, slice and dice. 80% Theory Exam, 20% Coursework (Locating and Removing an Index Finger)
  • Human Anatomy - Basic overview Head, Shoulders, Knees and Toes…
  • Immunology - A stripped down version so it fits in with Body Basics
  • Hospital Management 101 - Managing staff and wards
  • Project Management - How to write reports, arrange surgeries and give presentations

Year 2

  • Advanced Biology - Basic overview of the Heart, Lungs and Other Organs
  • Surgery 201 - Same as 101 with the addition of cleaning up blood
  • Theory of Surgery and Treatment - Studying common surgical techniques/medical prescriptions
  • Advanced Management Techniques - An abstracted version of Hospital Management 101, with a focus on inter-staff relationships

Year 3

  • Medical Practice  - An abstracted version of Advanced Management Techniques.
  • The Nervous System
  • Final Year Project - Find a supervisor and spend nine months diagnosing a patient. Or you can choose to find your own patient if your supervisor agrees. Write a report on the illness and the treatment.

Then pick any 3 of:

  • Theory of the Heart
  • Theory of the Lungs
  • Theory of the Kidneys
  • Theory of the Brain
  • Theory of the Stomach

Then….Well that’s it. Go forth and become a doctor at any hospital or practice in the country, subject to a few weeks training of course.

A  note on students

Of course some students will have more experiance than others, some will have been practising medicine long before university, a few will be acedemic and so pick up the theory but fail completely at practical application but  most will find the management lectures a complete waste of time.

Lectures

This lot are broadly divided into four categories:

  • Research - In it for the new discoveries and don’t like lecturing. Boring lectures and an exam that will make you want to bash your head in.
  • Ex-Industry - Failed at industry (In this case working doctors), came back a few years later in the hopes of a more academic career. Think they know more since they were “in the industry”
  • Teachers - Love lecturing, usually older, could have made great doctors but chose to stay on and help teach.
  • Non-Medics - Administrative staff, brought in to teach you how to write up reports, do presentations and other practicalities.

What is the point of this?

Look at the above list of courses, hardly any go into any depth relating to practice. The modules are usually 70+% theoretical exam, and usually cover topics that in the real world would be looked up or simply known through practical use.

There are a number of modules completely unrelated to medicine (Hospital Management), these are a waste of valuable time that could be used giving students practical training.

No graduate, in any discipline, is fit for a management position. They need real world experience for at least a few months and by then any of the abstract bull taught in these modules will be forgotten and replaced with best practice and company specific processes.

In Closing

Would you let a doctor treat you if you knew they had just graduated from the above course? No? So why are courses structured like this with their main aim being to produce software developers?

Note: Yes I know Software Development is different from Computer Science, but lets be  honest 70+% of all students on Computer Science courses will go onto work in Software Development or very closely related fields.

Generating Mazes Using Markov Chains

While I was browsing reddit the other day I came across a post about generating super mario levels using markov chains.  Having never come across markov chains I set about learning about them, and their a pretty nice idea.

With this new found knowledge and a brain begging for a break from revising compiler design and parrallel processing exams, I sat down tonight with the aim of experimenting with them.

Settling In

I first started with a very simple chain program in C++, all this did was output letters (A and B) based on a markov chain. The results were not very impressive (how impresseve can a string of ‘A’s and B’s be?)

I then got the idea of map creation. This had several advantages

  • I wouldn’t have to mess around with file formats etc. Everything can be output to the command line
  • I am very familiar with the area
  • It should be quite fun

With those in mind I decided to start very simply by generating a map with the following markup chain:

Current State Change to Wall Change to Path
Wall 20% 80%
Path 80% 20%

Now, this is a VERY simple setup. but it created some maze-like mazes: (Note, I added the boundaries in)

# # # # # # # # # #
# # - - # - - - # #
# # - - - - - - - #
# - - - - - - - - #
# # - # - # - - - #
# - # - # - - # - #
# - - - - - - - - #
# - - - - - - - - #
# # # - # # - - - #
# # # # # # # # # #

Making the Mazes more Maze Like

Clearly the above maze isn’t that maze-like. So next I started playing around the the probabilities. One most successful was:

Current State Change to Wall Change to Path
Wall 55% 45%
Path 75% 25%

which generated mazes like this:

# # # # # # # # # # # # # # #
# # - - - - - - - - - - . - #
# - - # # # # # - - # # - - #
# - # # # - - - . - - # # # #
# - - - - - # - - # # # # # #
# - - # - # # # # # - - # - #
# # - - # - . - # - - - # # #
# # # - - # - - - # - # - - #
# - - # - - - - - - - # # # #
# # - - # - . - # # # - - - #
# - - . - . - . - - - # - - #
# - - # # - - - - - - - - - #
# # # # # - - - - - - - - # #
# # # - # - - - - - - - - # #
# # # # # # # # # # # # # # #

There is also a thrid state (hence the dots) that represents treasure. There is a 5% chance that this follows a path, and in the third state the only probabity to transition is 100% back to path.

Pretty

So after all that, I decided to see if they were any fun. I dug out the old Morpheus engine Dan and I built last easter and generated a 50×50 map.

I actually looks pretty good (but then again, anything 3d can look pretty):

screenshot-morpheus

And on one last note: Dan….we really need to fix that engine…runs really slow when the map gets full…lack of culling :P

10 Books You Should Read

So here they are, my top ten books (in no particular order - except for number 1 that one is just awesome):

  1. Godel, Escher and Bach: An Eternal Golden Braid - An AWESOME book that covers philosophy, maths, music, art, programming, computer science and i’m sure there is more in there. Definitely worth at least ten reads.
  2. The Art of Intrusion - A collection of tales from the security underground as Kevin Mitnick describes some of the best hacks of the last 40 years. If you are interested in security, this should be on you’re book shelf
  3. Turtles, Termites and Traffic Jams - Are groups always centralised? Is there really a need for a leader. When I first read this book it was an eye opener. Five years later and it still has a place on my shelf and influences my current work.
  4. Genesis Machines - Explore the past and future of biological computation. A real eyte opener into new fields of computational theory.
  5. Snow Crash - The best fiction book I have ever read! Years ahead of it’s time and as relevant today as it ever was.
  6. Any of Isaac Asimov’s Stories (Try to get an anthology) - From the guy who invented the modern idea of robots. His stories will make you stop, pause, think, chuckle and will shape you’re ideas of humanity.
  7. Web Standards - Please can more web developers read this! Three years on from my major web developing phase I still get annoyed when I see a poorley constrcuted site.
  8. Real Digital Forensics - It’s amazing what your computer says about you. This book, while written for a commercial audience, provides a very nice insite into this very fact.
  9. The Annotated Turing - The essay that, you could argue, started it all. This book leads you through turing original article as well as providing handy annotations that aid discovery. I wish I had read it earlier on my path to computer science.
  10. The Computational Beauty of Nature - Provides a very nice insite into applying computational theory to nature and vice-versa. Definitely one to enhance you’re understanding of both.

2009

Happy New Year!

Welcome to my blog. My name is Jamie Lewis (as you may have guessed from the domain name!) and I am Computer Science undergrad currently in my final year of university. My main topics of interest are self organisation, digital forensics and artificial intelligence.

In a nutshell this blog will act as :-

  • A development log of my personal projects
  • A base for random aritcles and thoughts about a variety of topics
  • A place for book reviews, since I go through so many of them these days
  • Somewhere for me to publish some of the older articles from past blogs
  • and probably some other stuff as well.

Posting should be pretty frequent, I am aiming for more than three posts a week so we will see how that goes…