Startup School was a Blast

I recently returned from a four day trip to California to attend Y Combinator’s Startup School ’09 and to explore the Silicon Valley area. I had a great time and its definitely something I would recommend to anyone interested in pursing a startup.

Some highlights:

On the connecting flight from Vegas to San Francisco I was inclined to think that every 20-something guy on the plane was also headed to Startup School. I was a bit disappointed to discover that the geeky Asian guy sitting next to me was not also a startup groupie.

Northern California is quite something from the air:

cali

After my flight got in I headed over to the YC office in Palo Alto. I got to meet Paul Graham, a few YC alumni, and a few dozen aspiring founders who, like me, hope one day to earn that opportunity. A few people recognized my name from this blog and my work with Domain Pigeon, which was kinda cool.

One thing that was really amazing was the robot they had in the back, which Trevor and his team were showing off:

terminator-robot-killing-machine1

The next day were the Startup School talks. Chris, a Rails developer I met through Philly on Rails meetups, attended with me. I won’t go into much detail about the talks, as they have been written about pretty extensively, but I thought they were all very well done. I liked Jason Fried’s a lot. His style and adherence to his principles are inspiring.

Afterward, Chris and I bounced around three of the post-Startup School meetups: the one immediately after a law firm in Berkeley and later, Dropbox and AirBNB in San Francisco.

Dropbox was awesome. I kept thinking, “This is how a startup should be.” Their office, located in downtown San Francisco, was a hacker paradise. Two to four 27″ monitors per desk, comfy Aeron chairs, a room-size dry erase board with scattered calculations, and, of course, Rock Band and a ping pong table. What more could you need?

The AirBNB guys and gals put on a great party too–the air crew outfits were a nice touch.

The next day (Sunday) Chris and I wandered around northern San Francisco. We started off walking, and later wound up biking around Fisherman’s Wharf. We biked over the Golden Gate bridge, through Sausalito, around to Tiburon, and took a ferry back. San Francisco is such a beautiful area, especially compared to New Jersey. The air is cool, the sky golden, and best of all, people know what a startup is. None of this “So you want to make websites?” business I hear over here.

On Monday, I spent the day sightseeing around the Silicon Valley area. I asked for advice on HackerNews as far as what to check out and wound up following most of the suggestions, with the exception of the Computer Museum, which sounded too intense for me. I started out with brunch at the Coupa Cafe in Palo Alto, and then walked around Stanford for an hour or two. Palo Alto is a beautiful area:

paloalto

And Coupa did not disappoint. I enjoyed a delicious breakfast crepe while trying to make out what everyone else was working on. I overheard an older well dressed guy, presumably a VC, mention Ron Conway in a conversation with a a young, jeans-and-tshirt startup guy. It was kind of funny because that’s exactly what people said it would be like.

Speaking of VCs, I eventually found myself on Sand Hill Road of Silcon Valley fame. I took a picture of the street sign and sent it to my wife, who replied with something about how I was lucky to have a wife because I’m such a major geek. She’s so sweet.

sandhill

Tired of walking, I drove up Page Mill Road to Skyline blvd, which offers an amazing view of the valley.

siliconvalley

At the main scenic overlook I met a shirtless electrical engineer named Mike whose startup recently went busto. It was a much-needed reminder not to forget about the inherent survivorship bias of the Startup School speakers. Most were there because at least one of their companies had done spectacularly well; you don’t hear much from many startups like Mike’s who quietly fail. Anyway…

The rest of the day consisted of Google (not even a keychain?), Fry’s (wow), and In & Out Burger, which lived up to its name.

inoutburger

I flew back to Jersey on Tuesday. It was raining when I arrived, and had been for several days.

###

One thing that people kept asking me during the trip was “Working on anything right now?” to which I had to answer “Not at the moment, I’m between projects” which sounded OK until I heard someone else say it, and then I realized it was pretty lame.

I also had an epiphany of sorts. I had planned on doing my next project in Django. Domain Pigeon was a Rails project and I figured as long as I’ve got time, I might as well learn a new framework with each new web app. What I realized is that the language and framework don’t matter as much as identifying something people want and executing on that idea. Meaning, if I eventually succeed as a startup founder, its not going to be because I used Rails or Django or whatever. It’s going to be because I create something amazing. And what I’ve come to realize is that that’s what I should focus on, not on learning a new framework. Customers don’t care about your framework; they care about the product. And so I ought to be building and launching sites because ultimately that’s what’s going to matter in the end, not the framework that powers it.

With that in mind, I started working on a new project on the flight back from Startup School.

And I’m really excited.

Startup School was a blast.

Some highlights:

On the connecting flight from Vegas to San Francisco I thought was inclined to think that every 20-something guy on the plane was also headed to Startup School. I was a bit disappointed to learn that the geeky Asian guy who sat down next to me was not also a startup groupie.

The get-together at YC on Friday night one of the best part of the trip. I got to meet Paul Graham, a lot of YC alumni, and a lot of aspiring founders who, like me, hope one day to earn that opportunity. A few people recognized my name from this blog and my work with Domain Pigeon, which was cool.

Chris, a Rails developer I met through the Philly on Rails meetups, attended with me. I won't go into much detail about the talks, as they have been written about pretty extensively, but I thought they were all good presentations. I liked Jason Freid's a lot. His nonconformity and adherence to his principles are inspiring. 

Afterwards Chris and I bounced around three of the post-Startup School meetups: the one immediately after XX Law Firm in Berkeley and later, Dropbox and AirBNB in San Francisco. 

Dropbox was awesome. I kept thinking, "This is how a startup should be." Their office, located in downtown San Francisco, was a hacker paradise. Two to four 27" monitors per desk, comfy Aeron chairs, room-size dry erase boards with scattered calculations, and, of course, Rock Band and a ping pong table.

Chris and I spent in Sunday in SF, first walking and later biking around Fisherman's Wharf. We eventually biked over the Golden Gate bridge, through Sausalito, around to Tiberon, and took a ferry back. SF is such a beautiful area, especially compared to New Jersey. The air is cool, the sky golden, the people liberal, and, best of all, and people don't look at you funny if you say you want to work on a startup. 

On Monday I travelled around the Silcon Valley area. I asked for advice on HackerNews as far as what to check out, and wound up following most of the suggestions. I started out with brunch at the Cuepa Cafe in Palo Alto, and then walked around Stanford for an hour or two. Cuepa did not disappoint. I enjoyed a delicious breakfast crepe while trying to make out what everyone else was working on. I overheard an older well dressed guy, presumably a VC, invoke "Ron Conway" in a conversation with a a young guy in jeans and a t-shirt. It was kind of funny because that's exactly what people said it was like.

Speaking of VCs, I eventually found myself on Sand Hill Road of Silcon Valley fame, which was neat. Tired of walking, I drove up Page Mill Road to Skyline drive, which offers an amazing view of the valley. At the main scenic overlook I met a shirtless electrical engineer named Mike whose startup recently collapsed. It was a much-needed reminder not to forget about the survivorship bias of the Startup School crowd. Most were there because at least one of their companies had done spectacularly well; you don't hear as much from the ones that fail or achieve mediocre success.   

Next, I then headed over to Google, but, alas, there isn't a gift shop or welcome center or anything like that to browse around. I couldn't even get a keychain =/. Finally, I stopped by Fry's, which was easily the largest electronic store I've ever seen.

Tuesday I headed back to New Jersey. 

It was raining when I got in, and had been for several days.

###

One thing I kept getting asked during the trip was "What are you working on right now?" to which I had to answer "Nothing, I'm between projects" which sounded OK until I heard someone else say it, and then I realized it was pretty lame. 

I also had an epiphany of sorts. I had planned on doing my next project in Django. Domain Pigeon was a Rails project and I figured as long as I've got time, I might as well learn a new framework with each new web app. What I realized is that the language and framework don't matter as much as making something people want and executing on that idea. Meaning, if I succeed as a startup founder, its not going to be because I used Rails or Django or whatever. It's going to be because I create something amazing. And what I've come to realize is that that's what I should focus on, not on learning a new framework. My point is that I ought to focus on building and launching sites because ultimately that's what's going to matter in the end, not framework I use. 

With that in mind, I wrote the first line of code for my new project on the flight back from Startup School. I'm excited.

A Poker Bot Comment Worth Reading

This is post #13 in an ongoing series of articles about my work as a poker bot developer.

An anonymous poster left the following comment on my last poker bot post:

Hi Matt,

very, very interesting article series — please keep it up if you have more material.

I’ve also written a bot. It started as a little helper tool for my own, manual SNG-playing, showing a HUD on the table with the other players’ OPR stats etc etc. Having that in place, I couldn’t resist the temptation to see how hard it would be to do some table scraping, and when it turned out that was really straightforward, I started coding up a little rule-set that I believed would be able to win at low-stakes SNGs, where play is less than stellar…

After about 4-5 weeks, of off-hour, hobby programming during some evenings and weekends (I have a family with two small kids, so time is limited), I had it absolutely *crushing* the 18-man turbo $1.75 and $3.40 SNGs on Pokerstars — with a 50% ROI vs the field (ie not counting the rake). Actual ROI (counting the rake) was ~35%.

Table scraping etc was effective enough that the bot could easily 24-table (and probably way more — I never tested with over 24), but I kept it at 12-18 simultaneous games, to not go completely overboard on the volume.

After about 1.5 months, and 6-7k games, Stars’ security team busted me. I’m not sure what triggered it — it might have been a captcha I missed (I usually just left the bot playing overnight while I was sleeping…), it might have been decision patterns that set off an alarm, it might have been things they scraped off my computer (mouse movements or something like that — although as you also mention, I believe that’s actually quite unlikely, as they will get an insane amount of false positives, for TableNinja users etc), or — most likely — it might have been the volume that led to a manual investigation of the account.

Just before I was busted, there were seemingly random changes to the layout of the hole cards and board cards, and they were sometimes antialiased a little different. That was probably a trap in the Stars client that they can trigger from the server side, to see if the other side starts timing out or doing something else stupid. And my bot obviously fell right into it.

A couple of days after that happened, I then got the same email you got, about terminating my account, confiscating the money I had (I had made a withdrawal the day before, so that was a tiny sum), and expelling me forever from playing at Stars.

Oh, well. It was a short but interesting ride — but as you also say, it wasn’t really worth it.

Awesome.

And wow: 4-5 weeks to program a winning low stakes SNG bot with a 35% ROI. That’s pretty remarkable.

I’ve always had a suspicion that the abnormally high number of HUSNGs that my bot played/day was what ultimately led to its demise. I suspect that may be the case here too: 6-7K SNGs in 6 weeks–I bet that’s quite an outlier ;)

Another thing he mentions is the seemingly random changes to the layout, which I can also attest to. The tables would randomly resize by a few pixels, which would normally be imperceptible to a human player but for a bot that depends on certain pixels being in exact positions, it causes a lot of trouble.

Anonymous poster whoever you are, thanks for the fascinating story.

Building a Shortstacking Poker Bot – A Visual History

This is post #12 in an ongoing series of articles about my work as a poker bot developer.

In late 2006 and early 2007, I tried to build a shortstacking poker bot.

Shortstacking, in a nutshell, is a strategy that advocates buying in for a relatively small amount of money compared to your opponents and then playing very aggressive preflop poker. Most opponents do not adjust correctly to your stack size, and, in theory, you can make a lot of money from their mistakes.

Here’s a quote from shortstacking strategy guide on what used to be DonkeyDevestation.com:

By buying in with 20bb, you control the size of the stacks that the hand is being played for, not your opponents. Most of your opponents will be making plays preflop that are suitable for a full stack game but would be losers against 20bb stacks, and therefore losers against you. They take the worst of it against you to play better against the others, and you profit from this. Many players will complain about short stack players, claiming they are “lame” or “unskilled”. And they are right. It is lame, and it does take less skill to play a short stack. But it is very profitable, especially in today’s games. Furthermore, unlike most strategies, short stack play actually becomes more effective as you move up in limits, because other players tend to be more aggressive preflop, meaning they are putting more money in with hands they would not raise if they were only playing against you.

Shortstacking was appealing to me as a first time bot developer because it had been written about fairly extensively and the strategy, at least from a preflop perspective, was pretty well defined.

Here, for example, is a chart of a player named cuzco, who successfully employed a shortstacking strategy:

cuzco

How hard could it be to study his hand histories and have a bot emulate his decisions?

I already had a bit of experience writing add-ons for the PokerStars software (see PokerShark), so I figured it would only take a few weeks to get a prototype together.

In November 2006, I started programming.

The first major hurdle was figuring out how to read the chat box on the PokerStars client. PokerStars uses some custom controls which can’t easily be read using standard Windows API techniques, so I tried using Optical Character Recognition (OCR) to convert the pixels to words:

PokerStarsOCRInitial

And later:

PokerStarsOCRProgress

Eventually I figured out that PokerOffice, which makes a popular add-on for PokerStars, adds their own chat control on top of the default PokerStars one and it can be read using standard techniques. This was a big step because I no longer had to rely on OCR to get the text, which didn’t work very well (a lowercase L and a capital I look the same, for example).

Reading the text on the PokerStars Lobby was also important in order to automatically open new tables:

LobbyOCR

Using some shortstacking strategy guides as a starting point, I put together extensive preflop and postflop logic charts which were eventually implemented in the bot:

PreflopLogic

By the end of January, I had a working product:

InterfaceJan

It was capable of multitabling like the machine it was:

12Tables

Most days it lost money, which was to be expected during development, but some days it did very well:

PokerTrackerSwings

And that often gave me hope that the changes I had made the previous day were all that was needed to finally make it profitable.

I did a lot of A/B testing to try to measure what effect, if any, the changes I was making were effective:

ABTesting

Another thing I had to worry about were CAPTCHAs, which PokerStars is fond of using to identify bots:

CAPTCHA

Eventually I realized that conditional statements were not enough. There are simply too many situations in No Limit Texas Hold’em to account for–even when you’re shortstacking. For example, how do you take into account bet sizes and your opponent’s stack size? “IF … THEN” could not adequately handle that, so I started playing around with Expected Value (EV) calculations:

DecisionTreePostflop

Unfortunately at the time I didn’t have the tools to implement these techniques.

Nonetheless, I persisted with the shortstacking bot, believing that it only would take a few more changes before it was profitable.

March rolled by…

InterfaceMarch

And April came around…

InterfaceApril

But, despite my best efforts to turn it profitable, it kept losing.

By the time I decided to quit at the end April, the bot had played roughly 49K hands and blown through more than $1,300:

PokerTrackerGraph

Eesh.

Shortstacking, it seemed, was harder than it looked.

What I eventually realized is that your profits from shortstacking come from a few key decisions and if you didn’t make the correct moves at those moments, you couldn’t win enough to be profitable. In other words, I may have had a 90% solution–though I doubt it–but because it couldn’t make the correct decision that remaining 10% of the time, it could never be profitable in the long run.

Frustrated but determined not to let the work go to waste, I decided to start from scratch and to build a No Limit Heads Up Sit-n-Go (HUSNG) bot. That was my game of choice and I figured as long as I’m going to work on something, it might as well be with a game that I enjoy and had a lot of experience with.

Tatta, one of the most profitable Sit-n-Go players on PokerStars, was my inspiration:

tatta

“If I could only achieve a fraction of his success,” I reasoned to myself, “this will have been worth it.”

For the rest of this story, I’ll point you to the previous 11 posts about the HUSNG bot.

To sum it it: after several more months of work it was profitable, but shortly thereafter, PokerStars caught it and closed my account.

Doh. :)