Random header image... Refresh for more!

Posts from — February 2010

That Could Be A Problem

Can you spot the bug here?

public void ButtonDown()
    Rotate(NxcMotorPort.OUT_B, -50, 45);
public void ButtonUp()
    Rotate(NxcMotorPort.OUT_B, -50, 45);

February 28, 2010   No Comments

Learning From Mistakes

It made it through Round 1 and got a score of 56 points.  Time to take a step back and analyze what I’ve observed.

  • The biggest problem is losing track of the bomb.  It will be on track to catch the lowest bomb, when suddenly the detection will skip a beat and it’ll take off across the screen for something else and can’t get back fast enough to catch the bomb.  I have to fix this first.  I’m pretty sure I have outlier detection from the Pong game that I can reuse here.
  • The segmented calibration that I described back on the first day seems to be working fairly well.  That’s where the robot moves the paddle knob a known number of degrees, then the program sees how far that moved the buckets on screen, and calculates how many pixels a degree is.  This lets the program know that to catch the bomb that’s 70 pixels away, it will have to rotate the paddle 30 degrees.  I suspect that I will have to tweak the algorithm a bit, though.  Mainly, I think it will need to do several calibration turns to refine the numbers.
  • The response time is going to be a killer.  I have little doubt that the motor itself can move the paddle into position fast enough.  When it moves, it zips across the screen.  The problem is that it doesn’t get moving as fast as it needs to and there’s an unacceptable lag between commands.  I think I might still be seeing an echo of the waggle.  It’s not as visible, due to the weight on the spinner assembly now, but I think that delay is still there.  If I can fix some of the other issues, I suspect that the response time is going to prevent the robot from getting past around level 3.
  • The NXT has an inactivity timer.  The robot turned itself off in the middle of a game.  Gotta take care of that…
  • I don’t want to keep hitting the button to start a round.  I’m going to have to implement the button press.  Unfortunately, implementing the button press means I’ll have to change around how the PaddleController class works.  It’s a dirty hack right now, I gotta clean that up.
  • I like that Kaboom! is a much faster game cycle than Pong.  With Pong, I couldn’t always tell what was wrong right away.  Sometimes it took a minute or two to get the ball in a situation where something went wrong.  I’d implement a fix and try again, and again, it would take a minute or two.  Kaboom! doesn’t last that long.  The games at this point are less than a minute long, sometimes much less.  If the robot is going to lose, it’s going to lose fast.  It’s not going to end up in a cycle where the ball keeps bouncing around between the same two points over and over and over for five minutes.  If a game in Kaboom! lasts five minutes, then it’s an amazing success.

February 28, 2010   No Comments

56 Points!

In that game that it got past round 1, it ended up getting 56 points overall.

February 28, 2010   No Comments

Round 1 Success!

February 28, 2010   No Comments

200% Improvement!

Doubled its score in just a few minutes.  If I can keep on this rate of improvement, it’ll be awesome in no time!

February 28, 2010   No Comments

7 > 0

Okay, now just 2993 more points to go for the prize!

February 28, 2010   No Comments

This could be bad…


I’ve got it under control for now.  It doesn’t have wheels, so it can’t go anywhere, but we can’t take any chances.  Does someone have a spare Unintended Self-Awareness Containment Unit that I could use before this gets out of control?

February 28, 2010   No Comments

Finite State Machine

I think I’m going to have to put together a finite state machine for the robot.  The robot for Pong had essentially two states:  “Playing” and “Totally Flipping Out”.  I need to do a better job than that for this one.

Here’s the basic states for Kaboom!:

  • Bombs on screen:  Track the lowest bomb.
  • No Bombs on Screen: Press button.
  • No Buckets on Screen:  Hit Game Reset switch.

At this time, it won’t be able to hit the Game Reset switch itself, so it should probably put a notice on the screen for human intervention. 1  For the “No Bombs on Screen” state, it’s going to have to hit the button, then wait before trying to hit the button again, otherwise it’ll hit the button a second time, before the bombs start to fall, and it’ll lose precious reaction time.  When the bombs are on the screen, it’s going to have to be careful and make sure that it doesn’t get fooled by blips where the lowest bomb disappears for a frame.  However, it can’t be too careful, since it’s going to have to move to the next spot as soon as it catches a bomb.

For now, I’ll get the “Bombs on Screen” state going, since that’s the one that’s important.  I can hit the button myself for now, as long as I’m careful to keep my fingers clear of the spinning bricks.

  1. And I don’t want to give it the ability to hit the reset switch itself.  You teach it how to do that and you never know what it’s capable of. []

February 28, 2010   No Comments

Achievement Unlocked: Welcome to Raccoon City

So, I’ve lost half the day to a stupid virus.  WONDERFUL.  After repairing my Master Boot Record from the XP Recovery Console, I’m hoping that it’s gone now.  Of course, I can’t tell because all of the Anti-Virus/Anti-Spyware tools I’ve used are COMPLETELY WORTHLESS and didn’t catch it or any of the previous outbreaks there’ve been.  I wonder if it’s been with me for months and can explain these randomly recurring virus hits that come out of nowhere and never seem to die, too.

I’d really like for someone to explain where it came from originally, too.  There has to be something I did wrong, somewhere that I let my guard down, and I’d like to plug that hole.  If I’m going to get randomly hit with no explanation while being safely behind a firewall and anti-virus program, then to hell with it, I’m going to start going to porn sites and start torrenting WaReZ.

February 28, 2010   No Comments

Crazy Weekend Project #4

I know what Crazy Weekend Project #4 will be.

It will be a real-world implementation of robotfindskitten with a special additional mode where the robot hunts down people who write rootkit/MBR viruses and beats them repeatedly with a large metal pipe.

Perhaps it could train the kittens it finds to develop a taste for blood, too.  That could help greatly.

February 28, 2010   No Comments