` bt-blog

PAGE HAS MOVED AGAIN

NOTE : This is no longer being maintained -- go to http://research.tannerpages.com


In fact, it's worse than not being maintained... I actually moved the content. So just come over!

Oct 11, 2007

I moved AGAIN!

UPDATE JULY 2008 AGAIN I MOVED
Come visit at http://research.tannerpages.com


I've moved my site again.

I know, I know... too often.

The new site is using the Joomla content management system with a Rocket Theme theme. I really like it.

See you at REDACTED.

May 10, 2007

Why my page changes so often

I hate webpages. I mean, I like web pages, but I despise keeping my website up to date, looking good.

I haven't yet found a convenient solution to the web-site update management problem (wump). Every 6-12 months or so, I decide whatever I've been doing is exactly the wrong thing and I should try something new. The iteration of my website before this was a Google groups site here and before that it was a site I threw together with Apple's iWeb software. Before that it was phpNuke, postNuke, Mambo, Wordpress, and numerous hand crafted web sites.

I'm really hard to please.

The odyssey continues with Blogger.

May 7, 2007

How to install sCons on Intel Mac OS 10.4.9

sCons (http://www.scons.org/) is an awesome, cross platform, python based build tool. I am using it for my bt-glue project.

Anyways: installation is quite straightforward. But you need to know 1 key thing! Get the latest build, and NOT the stable build. The stable build is several years old and missing features you want. I promise.

1) Download the latest tarball, unpack it
2) Execute: sudo python setup.py install
3) Edit your .profile and update your path to include:
/System/Library/Frameworks/Python.framework/Versions/Current/bin

If you don't know what that means, that's ok.
i) Create a file in your home directory called ".profile".
ii) Add a line like this:
export PATH=$PATH:/System/Library/Frameworks/Python.framework/Versions/current/bin

iii) Save the file

Now, when you open a new terminal session, you should be able to type: scons -version and have good things happen.

Happy sCons'ing.

How to install it++ on Mac OS X 10.4.9

Note: Thanks to Alex Alvarado for pointing out a small error with the instructions. Also thanks to Brad Joyce for pointing our numerous other leaps in the directions.

There is some cool software called it++ which lets you write and do Matlab/Octave-like things in C++. So far I've had some trouble getting it installed.

You see, it uses blas, cblas, LAPACK, and fftw (and maybe some other stuff). Generally you'd want to have all these installed yourself before using it++, but on Mac OS X (since 10.2 I think), everything except fftw comes in the vecLib framework (which comes WITH OS X).

So, how do you get this thing running?

1) You need a fortran compiler, and apparently you won't have one by default. In theory, you can install it with Fink. That didn't work for me. I went to http://hpc.sourceforge.net/ and used his binaries . You're looking for g77 3.4. There are instructions there on exactly how to unpack the archive so that everything goes to the right place. Works great. Make sure that you add it to your path in ~/.profile and that you restart terminal (so that the changes take effect). G77 will go in /usr/local/bin, so you should add a line to your ~/.profile like:
export PATH=/usr/local/bin:$PATH

2) You need fftw. I just downloaded, did a ./configure , make, sudo make install and it went off without a hitch.

3) Now you want to install it++. First, go download and unpack it. Then, you should be able to:
./configure

You'll see this (hopefully)
------------------------------------------------------------------------------
itpp-3.10.10 library configuration:
------------------------------------------------------------------------------

Directories:
- prefix ......... : /usr/local
- exec_prefix .... : ${prefix}
- includedir ..... : ${prefix}/include
- libdir ......... : ${exec_prefix}/lib
- docdir ......... : ${datarootdir}/doc/itpp-3.10.10

Switches:
- debug .......... : no
- exceptions ..... : no
- html-doc ....... : no
- shared ......... : yes
- static ......... : no

Documentation tools:
- doxygen ........ : no
- latex .......... : yes
- dvips .......... : yes
- ghostscript .... : yes

Testing tools:
- diff ........... : yes
- sed ............ : yes

External libs:
- BLAS ........... : yes
* MKL .......... : no
* ACML ......... : no
* ATLAS ........ : no
- CBLAS .......... : yes
- LAPACK ......... : yes
- FFT ............ : yes
* MKL .......... : no
* ACML ......... : no
* FFTW ......... : yes

Compiler/linker flags/libs/defs:
- CXX ............ : g++
- F77 ............ : g77
- CXXFLAGS ....... : -DASSERT_LEVEL=1 -O3 -fno-exceptions -pipe
- CXXFLAGS_DEBUG . :
- CPPFLAGS ....... :
- LDFLAGS ........ :
- LIBS ........... : -lfftw3 -llapack -lblas

Note: If y ou didn't install fortran (g77), it WONT FIND LAPACK OR BLAS. That took me a long time to sort out. You've been warned.

Now, if everything went according to plan, you can do:
make
make check

This will run some checks to make sure things are working ok.

sudo make install

That's it, now you're done. Great work. Watch for a follow up post of how to use it++!

May 5, 2007

Don't Order Pizza Online From Pizza Hut (at least in Canada)

Somebody should get fired.

So, Mom Harriott is visiting, and we thought we'd order Pizza. Usually we order online from Pizza 73 which is a painless (and actually enjoyable experience). Their interface is all "Web 2.0" with dynamic updating of pages without reloading, and its well done.

But Ariel doesn't like Pizza 73 as much as others, so we're going to explore. She's got a Panago flier, but I prefer Pizza Hut, so I'm checking their website.

I should mention, all of this frustration happened yesterday, and I eventually gave up. I'm reliving the experience today so that I can tell you about it.

I go to www.pizzahut.ca and score, they have online ordering (I don't like the phone). So I click the link, and am presented with a map of Canada: click Alberta. Easy so far.

Ok, now I'm at "Already registered" or "Not Registered?". First off, I don't want to register, I just want to order a pizza. This is the first bad sign. But whatever, I can dig it. I'll go the "Not Registered" route, type in my postal code, and see if the service is available in my area (PS: of course it will be).

Ok, it takes me to a page for entering all of my info.
https://quikorder.pizzahut.com/phorders/registration.php?zipCode=a1b2c3&streetAddress=

I don't want to, but I do. I get to the end, hit submit, and I get "You must enter a valid zipcode". Oh, so they don't do careful validation, I typed my postal code like a0b1c2, I should try: a0b 1c2. No good. a0b-1c2. Nope. Ok, so it thinks I'm in America. How to change, no idea. How did I make them think that? No idea.

Maybe I made a mistake. So I start over. Same process, but when I get to the registration form, it's this one:
https://quikorder.pizzahut.com/phorders/registration.php?zipCode=a0b1c2&streetAddress=

I know what you're thinking. That's the same link! Yup. But this time the page has a red background instead of white. And now that field actually says postal code! Great! This is gonna work!

So I fill it all in and go "confirm", and I'm on the next screen.

Choose a username. Why do they do this? I thought username was a solved problem : use my e-mail address as username. It's unique, and its mine, and I've already typed it in on the previous screen. Nope, can't use that, username can't have the @ symbol.

Try btanner.

Now the password. Oh cute, they have a little password validator, makes sure you choose a good password. This is very important for ordering pizza. Lets pretend my school password is thrcew## (It's not). This password should be good enough for pizza hut, its good enough for Unix and everything else I use. Nope! Pizza hut says this is TOO SIMPLE. Ok, instead of ## at the end, I'll use thrcew33. That's apparently a stronger password, and it is accepted. Also, for fun, I tried "password11". That is also a strong enough password.

Now I need to choose a security question. There is a short list of options, fine. Birthplace city. Winnipeg. But, for some reason, the security answer field is password field, so it's ********. Interesting choice, even my bank lets me choose my security question in plain text. Whatever.

Click Finish.

Account name in use. Please try again. And it erased my password field, but not my security question fields. Fine.

Try. brian_tanner. Can't have "_" in it. Brian.tanner is out too then I guess. Hmm. Oh, "suggest a username" button. It suggests TannerB. How clever. Fine.

Oh. That one is in use, all fields erased again.

Try: IHatePizzaHut.

Oh. That one is in use, all fields erased again.

This is getting frustrating, lets make the username and password be thrcew33.

Nope, username and password cannot be the same.

ARE YOU KIDDING ME. I JUST WANT TO ORDER A PIZZA.

USERNAME: thrcew

Aha! I've cracked the Pizza Code! I'm in! Remember, by the way, I haven't even seen a menu or the prices/specials yet.

I'm not actually going to order anything now, because we ended up just calling Panago.

But, I hope you get the feeling of how horrible and frustrating this was. Let's sum up:
1) I chose Canada and got to the US registration page

2) Doesn't allow e-mail as username. Many username's already taken, including IHatePizzaHut.

3) Username suggestion is a waste of time, it suggested something that was taken

4) Password strength meter is more aggressive than anywhere else (in the wrong ways) and weaker (in the right ways). By the way, the Google password strength tester thinks that thrcew and thrcew## are strong passwords (too weak for pizza hut). Google thinks that password11 is only fair (strong enough for pizza hut).

5) Security answer is a password field (this is just weird, not a big deal)

At the end of the day, I just wanted to order a pizza. Now, I will never order a pizza from them again. My time is valuable, and someone at their company wasted a bunch of it.

I hopped over to the Pizza73 website to remind myself what thei process was all about.
1) Pick your food
2) Fill in details.

For Pickup, they need: Name, Phone, City.
For Delivery, they need address (and if you live in an apartment, the suite number). You must also choose a payment method, which means if you want to pay credit card you have to type it in. However : paying cash is an option.

Optional are e-mail address and comments.

Now, that is easy. I know who I'm ordering from next time.

So, if you care, be like me: don't support a company that puts such a low priority on useability.


PS: If you do want to order from Pizza hut, you can use this account and order as me, John Smith:

Username: thrcew
Password: thrcew33
Security Answer: Winnipeg (or winnipeg).

Post a comment here if you do. I'm going to send a link to this post to pizza hut, see if they care to comment.

Samsung ML-1610 Printer on Mac OS X (Intel Mac)

NOTE: Some of the steps in these instructions don't work anymore because the files don't exist. I've updated the instructions to work on Leopard, which you can check out here: Samsung ML-1610 Printer on Mac OS X 10.5 Leopard (Intel Mac) .

Hi. I have tried so many times to figure out how to get my Samsung ML-1610 printer working on my Intel Mac.

There are many quick explanations on the web of how to do this, but they don't seem to have all of the details... and as a non Unix guru, I've always had trouble making them work.

--

Ack. I just spent hours trying to actually get this working. I don't know why I try to be so clever. The instructions are posted below. The things is, all of the directions use OLD files, made for powerPC. I'm using a new Intel Mac, so I thought instead of following the direct links from instructions (to old files), I should find the up to date versions. NO LUCK with that.

Moral of the story: don't try to be clever. Here are the directions.
1) Go here: http://www.linux-foundation.org/en/OpenPrinting/MacOSX/hpijs

2) Download and install espgs-7.07.1.ppc.dmg (5.4 MB)

"But Brian" (you say), "that's powerPC! I have an Intel Mac." That's true.

You might also find it interesting to know that ESPGS (ESP Ghost Script) has been replaced by Gutenprint some time ago. It doesn't matter, don't go for Gutenprint. I tried that route, and had no end to my problems. I tried to build it from source and had errors, then installed it from a disk image only for it to 'work' but instead of printing my documents it would just fire up my printer and then not do anything.

Just install the old one from the page.

This worked on OS X 10.4.9 on an brand new Intel Imac on May 5 2007.

If you are more clever than me and got it working with newer software please tell me.

3) Download and install hpijs-foomatic-2.0.2.ppc.dmg (1.6 MB)

Same story, I know, I know, it looks old. It works. Suck it up. :P

4) Go to System Preference --> Print & Fax

5) Click the + button to add a printer

6) Samsung should be in the list now! Thank heavens. But, ML-1610 isn't there! Oh no! Just use ML-1210 Soomatic + GDI. Seems to work fine.

There, all done.

Again, if you have a more up to date method than this, please share it with me. I'm just glad to finally have this working.

Apr 7, 2007

BT-Glue

BT-Glue is a project that I'm currently putting a lot of my time into. Basically, the idea is to create a library of agents and environments implemented in C++ that can easily be plugged together. There is also a visualization component : currently implemented in objective-c with Cocoa on OS X, you can easily write a visualizer for an environment and watch the agent's value function, policy, whatever.

It's coming along quite well, and I think its sort of interesting. I'm also working on the "Second World", which is a large, very complex, environment that will be used for reinforcement learning research. The idea is that it is not supposed to be exactly like the real world, but it is supposed to be rich and complex enough to require beyond state of the art RL techniques in order to create successful agents. The agent's experience consist of rapid (10-100 hz?) primitive sensors signals that it must respond to with primitive actions. The project is a little unique because the environment is a real time environment, 1 second of world time roughly corresponds to 1 second of real time.

BT-Glue is cool because I want the agents from Second World to be portable to Mountain Car for example : generic agents, applicable to a variety of problems. That's where BT-Glue comes in.

Anyways, I should say more here, and I will later, but for now I just want to link to BT-Glue.

http://code.google.com/p/bt-glue/