Akṣi: Handwritten-digit-recognizing neural-network
I’ve always been interested in Neural Networks (ever since I first found out about them around 10 years ago). However, I never got a chance to learn about them or write one of my own; this is something I’ve wanted to do for some time. I got the opportunity this semester when my professor in my advanced data-structures class told us that we could pick any topic we liked, for a semester project. I thought that this would be the perfect time for me to learn about neural networks and create one of my own.
The end result was Akṣi, a neural network that recognizes hand-written digits. I’ve hosted it using Google’s App Engine. Please check it out!
Popularity: 1% [?]
Navy Railgun and Shuttle Ascent video
I came across a cool video of the Navy’s Mach 8 Railgun. That’s right. Mach 8. The railgun uses 33Mj; the aim is to get it to 64Mj. The previous record (by the same lab) was 2 years ago at 10.64Mj. There are still a few issues to work out, namely power consumption and heat dissipation. A railgun has no moving parts and simply uses electromagnetic energy to shoot a projectile. They can also be powered by the ship’s batteries. The Navy is expecting to deploy these to ships by 2020 or 2025.
The other video I came across is one explaining all aspects of the launch of a space shuttle (what the engineers look for, etc.). The video is 45 minutes long, but it is extremely informative and well worth it to watch.
Popularity: 5% [?]
The Sun’s not going to blow up
In any science fiction story I’ve read (or science fiction movie or TV show that I’ve seen) that talks about death of the Sun. I’ve always heard references to Earth’s sun “going nova”. I’ve read about this even in Asimov’s stories. In most cases, they’re talking about a supernova. But here’s the thing. The Sun is not going to blow up. Even if the writers were talking about an actual nova, they’re still wrong. Here’s why:
Our Sun is a yellow dwarf star (more precisely known as a G-type main-sequence star), and doesn’t have enough mass to undergo a supernova explosion (type IIa). You need a star that’s at least nine times the Sun’s mass for a supernova explosion. If we’re simply looking at a nova (type Ia), then the Sun doesn’t have a companion to draw matter from when it turns into a white dwarf. So no matter which way you look at it, the Sun is not going to blow up. It’s just going to be really, big and red and will eat the Earth. Unless the Earth moves outward due to the Sun losing mass. Finally the Sun with eject its outer layers and turn into a white dwarf. See? No blowing up. I don’t know why some science fiction authors still talk about the Sun “going nova”. Maybe it’s because it sounds more dramatic.
If anyone has read a science fiction story (or seen a science fiction movie or TV show) that talked about the death of the Sun/Earth and did so realistically, then let me know.
Popularity: unranked [?]
Artificial Life – some preliminary findings
I fnished my artificial life simulator over the weekend, and I have been running simulations on it. There were a few bugs initially that I quickly fixed. My initial simulations gave me some inexplicable “population explosion”. For example, in one cycle I would have 31 creatures and in the next cycle I would suddenly have around 9,000. It didn’t make very much sense until I analyzed the log files.
If any of you remember, I mentioned earlier that my “creatures” are nothing more than assembly programs. Each of these instructions (and parameters) translate into a bit pattern. Changes in the bit patterns lead to changes in the behaviour of the creature.
One of the instructions is a “reproduce instruction”. This prompts the creature to create a copy of itself, with possible mutations. The instruction has a parameter that tells the creature how many copies to create. During the course of the simulation, certain creatures evolved with the reproduce instruction as their first instruction.
My supervisor program (God program) runs one instruction of every creature during one cycle (sort of like an pre-emptive multitasking operating system). If a creature happens to reproduce during the current cycle, then the supervisor program will execute the child’s instructions as well in that current cycle. This led to an interesting situation. When the mutant that had the reproduce instruction as the first instruction reproduced, its child (if it didn’t have a mutation that changed the instruction) also had the reproduce instruction as the first instruction. So the supervisor program would run the child, and the child would reproduce with a similar offspring. This went on until a mutant that did not have a “reproduce instruction” as the first instruction, evolved. As you can see, this is what led to the population explosion. I corrected this problem by adding “sexual maturity” and “reproductive energy threshold” parameters to the creatures. Basically, a creature can reproduce only if it has been in existence for a certain number of cycles, and if its current energy is above its reproductive energy threshold. This got rid of the population explosion problem.
My simulations gave me some other interesting results. One of the instructions that I have is a MOV instruction. This instruction moves a creature from one cell in the two-dimensional array to another cell. There is a variant of this instruction, known as the MOVA instruction. In the MOV instruction, if the creature tries to move to an occupied cell, it will retreat to its original position. However, in the MOVA instruction the creature will try to kill (and subsequently eat) the occupant if the destination cell is occupied. I had created a creature that simply ate, reproduced, and moved to different cells. I noted that after many generations, this creature had evolved into an aggressive one, that would eat, reproduce, and move aggressively (MOVA) into other cells. That was rather interesting!
I also saw natural selection at work. When I corrected my population explosion problem, I made it so that the reproductive threshold of a creature was higher than its initial (starting) energy. Over the course of many cycles, I saw that the creatures evolved such that the initial energy would be very high, and that their reproductive threshold would be very low. In additon, their reproductive age was lowered. I thought that my creatures were having it too easy, so I modified my code to make reproduction a costly instruction. After running my simulation, I noticed the opposite! Now the creatures evolved such that the reproductive energy threshold would be much higher than their initial energy. It would seem that the creatures wanted to build up enough energy to where they would be able to reproduce successfuly.
There is also one very interesting behaviour that I noticed. I provide branch instructions in my instruction set. A creature can branch to any part of its code. In addition, I also have a Decrement and Branch instruction that is useful for iterative loops. One of my creatures evolved a clever strategy. It would decrement and branch into the middle of the branch instruction. When I analyzed the code, I noticed in doing so, the creature was performing a MOVA instruction in fewer bytes than writing an explicit MOVA instruction. It also had the added benefit of performing the MOVA instruction in an iterative fashion so that it could travel around the two-dimensional array. There was a reason for this kind of behaviour though. A creature consumes energy when it performs an instruction, and the energy consumption is proportional to its code size, so it is amazing, but not surprising that such behaviour could arise.
There is still more work that I need to do. I am thinking of giving my creatures some “memory” in the form of stack and RAM. They will have some Store, Load, Push and Pop instructions whereby they can write to and read from memory. Also, I am thinking of adding some more “registers”. Right now, the creatures have two count registers for performing iterative loops. My reason for adding more is this – I want the creatures to be able to act on the data in memory. For example, I can provide instructions that allow the creature to check the status of a particular cell, like if it is occupied, how much food it has, and so on. The creature can load data into the registers, and then use these registers as arguments for the cell checking instructions. This way I am hoping that my creatures will be able to evolve some rudimentary form of “intelligence”, or “intelligent” behavior. This will also increase my instruction set. Right now, if a mutation results in an invalid instruction, the creature dies when it tries to execute it. Actually, that reminds me – I had creatures that evolved with invalid instructions, but they had also evolved branch instructions that would jump over the invalid section of code!
Most of these complex behaviours aren’t that surprising when you consider natural selection… it is only err… natural that such behaviour should arise!
Well I guess that’s all I have for now. I might make a separate page for this project where I can describe this project in more detail. I’ll post more updates here after I run more simulations.
Popularity: 1% [?]
Intel and Artificial Life
This is my fourth day at Intel. I think I will enjoy working here. I haven’t done much yet though, and I still don’t know exactly what it is I am supposed to be doing. I tested some 140 chips yesterday, but that wasn’t too much work. My supervisor is out until Tuesday, so until then I am doing some odd jobs and reading up some documentation about the platforms and tools we use. I am excited to be working here. It looks like it’s going to be hard work, but I think it will also be fun.
Now about the Artificial Life. I have written up some specs on an Artificial Life program. This is different from earlier ones. I am implementing the “creatures” like assembly programs. This code is their “DNA”. It describes how they behave. A “God Program” executes one instruction of each “creature” and moves on to the next. Sort of like a pre-emptive multitasking operating system. The creatures all live in a two-dimensional area of memory. They can reproduce, and there is chance of error during reproduction.
I think I was going about it the wrong way earlier. I was trying to describe behaviour through variables and through discrete quantities. Now, I represent each creature as a bit-pattern – exactly like an assembly program. I have instructions for moving, eating, moving and attacking, reproducing, and sleeping. In addition, I have some very basic branches and loops. So based on the bit pattern, the creature has a certain behaviour. Also, changes in the bit-pattern can cause changes in behaviour. They can be subtle, or drastic. At least, that is what I believe. I need to actually implement my idea before I can find out! My God program is essentially an operating system, and the “creatures” are tasks. There’s a little more to all of this, but I can’t write it all here. If and when I finish the program, I will make a separate page for it and describe it in detail.
I am thinking of calling this program “Eden”. Anyway, that’s all for now!
Popularity: 1% [?]
Wisdom Teeth
I have been living on Tylenol for the past two days. My wisdom teeth have started to emerge from my lower jaw. The upper ones have been no trouble. The lower left one was no trouble either. However, the lower right one refuses to behave like his brothers. It is an eruption of pain. Day before yesterday I woke up with this throbbing pain in my lower jaw. I took some Tylenol and the pain went away. Next morning, I woke up with ever more terrible pain. It felt like someone had stuck a javelin through my lower jaw. I lay moaning in bed for about 15 minutes before I staggered to the bathroom and got myself more Tylenol from the medicine cabinet. This morning it seems to be slightly better. Here you go, Creationists. Try and explain this one. Why did you oh-so-perfect Creator create us with useless wisdom teeth? He didn’t even give us a jaw big enough to hold it. Pretty near-sighted, if you ask me.
I have a better idea. They are remnants of our plant eating past. When we evolved from being strictly herbivores to becoming omnivores, we didn’t need to grind plant matter so much. This weakened jaw muscles. Jaw muscles are anchored to the skull and since they were weakened, this let the skull grow even more since the jaw muscles aren’t squeezing it. Ergo, bigger brain. However, we still have the legacy code (excuse the programming analogy) for the wisdom teeth in our DNA. The code obviously doesn’t care that we have a smaller jaw, so it decides to express itself anyway.
I hear that some people get a healthy set. I think I might. It is only the lower right one that is causing me trouble now. In other people, they come up in horrible ways. Sideways, backward, sideways and backward… Horrifying thought.
Popularity: 1% [?]
Columbia
Being a complete nerd, this tragedy hits me really hard. I’m an avid space enthusiast and every shuttle mission fills me with hope and pride. Each of those missions is a mission for humanity as a whole. I can only imagine what the families and friends of those seven heroes are going through. I am also concerned about the impact this will have on the future of the space program. For those who say that we shouldn’t send anymore manned missions since it seems to be dangerous, they should realize that they are saying that these seven died in vain. The universe is there for us to explore. We can only dream about the day when we sail among the stars with ease. All that will be because of the brave men and women of today… Who take tremendous risks to reach for the heavens.
Popularity: 1% [?]
Columbia Lost
We lost Columbia. Broke up during re-entry over Texas, 16 minutes before it was scheduled to land. We lost all seven astronauts… It’s hard to believe that this happened…
Popularity: unranked [?]