Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Monday, January 28, 2013

Maximum information, minimum post

I've been planning for a while to write up some research I worked on in 2011 involving intrinsic "motivation" for robots. We got a workshop paper out of it, and I presented the results to the ECE department last year. I also planned to extend it into my thesis project.

But... the lab went through some advisor round-robin and the project fell apart, and I just don't feel like writing it up into a full post anymore.

In a nutshell, our robot learned a policy for a partially observable Markov decision process (POMDP) to learn about objects in a space by manipulating them with its arm, then assigning object classification probabilities, with Shannon information gain across all objects as the learning reward.

Here's the AAAI workshop abstract, with a link to the full PDF:
http://www.aaai.org/ocs/index.php/WS/AAAIW11/paper/view/3960

Here's a fun picture of the robot!

Tuesday, October 4, 2011

PIC + pyserial + Windows

I use PIC microcontrollers fairly often since I'm familiar with them and they generally have the features I need. That's a pain when I need to program a PIC board, then talk to the code over a serial port. I need Windows to burn the firmware, but I've never bothered to learn Windows serial port programming. 

Then I realized the pyserial library for Python is cross-platform. Sweet! One download and one "import serial" later I was burning firmware and talking to the PIC over USB serial, all from inside Vista.

PIC serial comms to the left of me, Python to the right, here I am, stuck in the middle with you...
(Well, almost... there's some weird version conflict where the pyserial version I downloaded doesn't like the Python version I have. Lucky I found a sketchy-looking forum post with some random dude's replacement for a key pyserial file. Copy, paste, run, and done. Sure, I can't close the serial port without getting an error, but it opens and handles data just fine. Thanks Internet!)