Watch Anime Online Anime Wallpapers naruto psp ads


Create a Meebo Chat Room

Tenshi the AI – Round 2

Posted by Author | Angel Beats, Anime, Anime Review, Commentary, Manga Review, Rakuen, programming, technology | Saturday 22 May 2010 9:33 pm

Maeno posed a question in Raph’s most recent post on Angel Beats.  Why didn’t Yuri just delete Angel’s program?  Wouldn’t that have solved the problem immediately?  The short answer to this question is she simply can’t do it.  I could just leave it at that, but it doesn’t really explain anything about the underworking technology.  If you’re prepared, click past the break so I can give you a little lecture on some basic computer theory.

You are not prepared!

Computers do not work as basically as most people think.  This is due to the wonders of abstraction.  You don’t actually need to know how the components work to operate a computer.  In reality, we could divide a program’s execution into three layers.  First, we have the place where we store all of our data.  For most people, you would use the hard drive.  Then, we have volatile memory, or RAM, which holds program and document information fetched from the hard drive.  Finally, we have the processor, which performs operations on data stored in the RAM.  Because of this layering effect, most operating systems “pin” data when it is stored in RAM so you can’t delete it.  Why?

Well, the first reason is obvious.  RAM is separate from the hard drive.  Thus, if data is already in RAM, deleting it from the hard drive doesn’t accomplish anything.  You can see this in action for yourself.  Simply open a document in your favorite word processor, and then try to delete the source file.  Your computer will tell you it can’t do it, probably with a message saying the file is in use.

The second reason is a bit more complicated.  You see, the computer only allows a program to use a finite amount of memory, even if more is available.  So, when you run a program, it won’t all be in memory all of the time.  On occasion, the processor will have to swap two segments of the same program to continue executing.  Now think about what would happen if you deleted a running program.  When the processor tries to make the switch, there’s no data to swap in!  At best, the program would crash, and at worse, it might try to continue executing with bad data.  Now think about how Tenshi is a melding of humanity and technology.  Do you really want to find out what happens when her ANGEL program is deleted while running?

Angelplayer can be yours for 3 easy payments of your soul!

This explains why Yuri doesn’t delete anything.  However, a sharp reader might wonder how Yuri can add to the program.  After all, it’s pinned down to the drive, right?  Well, there are languages that allow you to edit the program while it executes.  You can delete, change, or add to the code even though it’s running.  This does not stop you from causing errors, so you have to work with caution.  Yuri cannot delete or edit any code for that reason: she has no idea what will happen.  Specifically, she can’t read English.  Thus, she can only add to the program.  So long as her addition will not directly interfere with other functions, she shouldn’t have a problem.  Yuri types in a timer routine and links it to the program, and everything checks properly.

Now, I’m trying to explain this all off the top of my head and in very basic terms, so this still isn’t exactly how the computer works.  I simply present this as an illustration for why Yuri does what she does.  Hopefully, it makes more sense now.

Of course, she still screwed up, so... yeah.


Angel Beats – Tenshi the AI

Posted by Author | AI, Angel Beats, Anime, Anime Review, Commentary, Manga Review, Rakuen, Video Games, programming | Sunday 11 April 2010 7:57 pm

Shinmaru made a post about how Angel Beats closely resembles a video game over on his blog.  It’s an interesting post, and it culminates in comparing Tenshi to an old school AI such as Mike Tyson or the Weapons.  It’s a fairly good comparison, but I decided I would take the thought a bit further by fleshing out what makes Tenshi tick.  Today’s lesson deals with a bit of programming logic, but I’ll explain how it works.

Most adorable program ever made.

First, we need to consider how Tenshi acts.  Yuri says that if you stick to the program, Tenshi just observes and generally leaves you alone.  Now, if you deviate from the program, she confronts you and asks you to return to your proper station.  When you start to attack her, she spawns a blade to defend herself and slowly advances to melee range.  When the attack intensifies, she spawns a second blade or a shield, depending on the situation in front of her.  If, instead, you put yourself in melee range, she starts executing Lag commands, which either speed her up or slow you down.  I’m not sure which is the case because the battle is shown from Yuri’s perspective, but there’s a difference.  The latter leaves her vulnerable to other attackers.

You should notice two aspects of Tenshi’s power.  The first is all her commands are reactive .  She does nothing unless someone gives her a reason to act.  Second, she slowly escalates her attack.  Tenshi doesn’t immediately start lagging her opponent to make easy work of them.  Instead, she uses a specific level of force proportional to her opponent’s.

Never bring a knife to a gunfight... unless you're Tenshi.

In short, Tenshi acts just like a computer program.  Every program in existence requires some sort of user input, even if the means aren’t entirely obvious.  A program that seems to execute entirely by itself requires action from you to start.  That action usually generates an empty String, or blank input, which tells the program to execute with default conditions.  Thus, if Tenshi is a computer program, then the SSS gang members are either users or programs providing input.  For example, she might have the following, very basic, code:

while(meleeTest(targets)){
delay(targets);
}

What happens here?  This is a while loop, a conditional statement that repeatedly runs so long as the condition remains true.  In this case, the condition comes from the function meleeTest.  meleeTest accepts targets as its argument, or input.  A good programmer creates programs a normal person can read.  Therefore, you can assume this function checks for any person on the list of targets stands in melee range.  If true, the function returns the value true, which causes the loop to execute.  The loop body runs the delay function on the target list, and it will continue as long as the condition continues returning true.  Once meleeTest fails, which returns false, it continues past the loop to the next statement in the program.

Stand still so I can gut you properly!

Clear as mud, right?  Well, she does have an AI program for combat, but it doesn’t seem very sophisticated at this point.  You might see enemies in Halo or Gears of War who do things like flank or take cover when the situation calls for it.  Tenshi just walks in a straight line and has her way with you.  You might wonder how she could be so deadly, and it goes back to classic gaming architecture.  Back in the day, developers had little memory or processing power to use when making a game.  They could only design rudimentary encounters.  To compensate, they made their bosses tough as nails.  These enemies can hit unreasonably hard, spam attacks, and take incredible amounts of punishment before dying.  This has the bonus side effect of taking all your quarters at the arcade.

In conclusion, if Angel Beats takes place in a video game, Tenshi is That One Boss.

Yeah, she's gonna be just fine.





Read Manga Online | Osaka Hotels - Large range, many locations - Save up to 70% on Osaka Hotels.