Random header image... Refresh for more!

Category — Crazy Weekend Project 3: Atari Robot 2

At Least I’m Better Than The Robot.

March 1, 2010   No Comments

Achievement Unlocked: Big Truck Of Fail

That’s it.  I’m calling it.  This Crazy Project Weekend is over.

And it’s a big truck of fail.

The biggest problems are the motors.  They just don’t do what I tell them to do.  If they did, this would be a different story.  But I’ve spent over three days tweaking the motors and the robotics and I just can’t get it working.  Maybe I can get a Stelladaptor and try tweaking it with direct feedback.  Maybe I’d be able to do continuous smooth motion if I could have tracked all the bombs properly.  Maybe I just don’t know what I’m doing.

At least I was able to identify the playfield elements and get the computer to tell what the next move should be, even if I couldn’t actually get it to make that move.  The basic recognition and logic was a lot easier than it was for Pong, mainly because trajectories didn’t really matter.  However, I wasn’t quite able to get the bomb tracking/prediction logic working, which would have reduced the tendency for the robot to get distracted temporarily and miss a bomb.  The full tracking also would have made it possible to detect patterns and move smarter.  I also get the feeling that there’s something already in OpenCV that would have taken care of the object detection and motion tracking for me.  That library is so big and I’m not a computer vision expert, so I don’t really know what’s there or how to use it all.  The book and the documentation aren’t always enough.

And then that virus.  Stupid virus.  Make me waste half a day because the bloody computer stops working.  THAT WAS AWESOME.

The segmented auto-calibration thing did work.  I was able to adjust the robot power and swap out gears and the calibration generally figured out the new pixel/degree ratio.  If the motors were more consistent, then it probably would have worked better.  At any rate, that’s a decent technique that I’ll have to remember for the future.  And I’ll have to clean up the code for it, right now it’s kinda messy.

In the end, I did not accomplish what I set out to do.  The best score the robot ever got was 63, and that was a fluke.  And I didn’t even get close to trying to get it to play on a real TV.

March 1, 2010   No Comments

Give me mah bukkit!

And it really sucks that the BOTTOM bucket, the one that’s the most useful, is the one that goes away first.

March 1, 2010   No Comments

SUCK ON THAT, NEW STRATEGY!

You just got schooled by old strategy with a slight modification.

March 1, 2010   No Comments

New Strategy Fail

The problem with the “Flail Wildly” technique is that the paddle often flails wildly nowhere near the bombs.

March 1, 2010   No Comments

New Strategy FTW

I implemented the new strategy and already it’s doing better than the old one.

What is this magic new way to play the game?

if (bucketX < screen.ScreenSize.Width / 2)
{
    Paddle.Rotate(NxcMotorPort.OUT_A, (sbyte)-_basePower, 40);
}
else
{
    Paddle.Rotate(NxcMotorPort.OUT_A, _basePower, 40);
}
return;

I like to call it “Flail Wildly”.

March 1, 2010   No Comments

3.5 Hours Remaining

Just under three and a half hours left and the robot still can’t reliably make it out of the first round.

Time for a change in strategy.

March 1, 2010   No Comments

Um… No.

March 1, 2010   No Comments

Well, That Could Have Something To Do With It…

public CvPoint GetAverageVelocity()
{
    double avgX = BombPositions.Average(bomb => bomb.X);
    double avgY = BombPositions.Average(bomb => bomb.Y);

    return new CvPoint((int)avgX, (int)avgY);
}

And that’s why I don’t work for NASA.

March 1, 2010   No Comments

Bug Tracking

That ain’t right.

And I only have five hours left.

March 1, 2010   No Comments