I hadn't given much thought to poker hand evaluators lately when I received a comment today on the post 7 pointing me to this absolutely fantastic roundup of open hand evaluators at Coding the Wheel.
James Devlin clearly put an enormous amount of work into this analysis of currently available evaluators. As part of that work, he finished up my 7 card evaluator I posted here a year-and-a-half ago! He offers it as a library with a number of other evaluators including the phenomenal 2+2 evaluator.
And of course, I also really appreciate James' comments :) -
Paul Senzee is well known, in poker-programming circles, for his perfect hash optimization to the original Cactus Kev evaluator and for being an all-around programming BAMF.
Honestly, after that great post and the 2+2 evaluator, I'm not sure if there's any more I could possibly add to the problem of poker hand evaluation.
Although In Other Projects..
Something I've done a little work on recently - At ESPN, Play-by-Play Goes Virtual.
Monday, September 08, 2008
Poker Revisited + ESPN
Wednesday, July 09, 2008
The Ghost Box
The Art of Pranking Part II
The bigger, badder wireless pranking device that evolved from Part I of our pranking bonanza. This is a somewhat technical post. A following post will detail our exploits with it.

The completed device
Learning from the Past
There were a few issues with the first model.
- The photocell was clearly visible on the front of the adapter and that made it look suspicious.
- High maintenance. The contraption didn't work well when it was dark outside. In the interest of simplicity, it was designed to sound when it got too dark. That is, in the normal case, when a shadow fell across it. How dark was too dark was adjustible with a screwdriver. Of course, that meant that Ryan had to turn it off each night or if it rained out. This also made it high maintenance, because it didn't turn off automatically - it would keep sounding as long as the target was casting a shadow over the photocell. This drove Ryan crazy, since he had to listen to it and turn it on and off all the time.
- It was not wireless. Fazeel was eventually able to follow the cord back to the noise box when he figured it out. Then the jig was up.
- It only emitted one single type of noise. Although deliciously annoying, it didn't offer as much flexibility as we'd like.
Solutions
- The photocell should be better concealed. Bought a Nortel adapter at Skycraft Surplus for $5 apiece. Using a cordless saw, opened it up, removed the internals. Cut the transformer from the prongs that go into the wall socket, leaving enough plastic around them to keep them solid, and taped the terminals up to insulate them thoroughly from each other and the rest of the electronics I was stuffing in the box. Took one of the detectors from the toy (see below), pulled out the electronics and put them in.

Cut off the antenna and hooked up the adapter's cord as the new antenna. Added a battery holder and two AAA batteries. Drilled out a hole for the sensor, slipped it through. Still pretty conspicuous.

To obscure the photocell, cut clear contact paper into a rounded-rectangle shape consistent with the types of stickers you might find on these things. Then, colored over the contact paper with black dry erase marker.
Because this adapter now has batteries (the adapter from the previous prank didn't since it was powered from the box it was attached to), I had to install some sort of switch to keep the batteries alive. Otherwise, I'd have to tear that thing back open all the time to replace them. I really didn't have a way to solidly mount a tiny switch, so I slipped a tiny reed (magnetic) switch in the seam. It's powered on by sticking a really tiny rare-earth magnet on the switch. - The device should roughly detect motion, specifically a rapid change in light intensity as opposed to merely detecting dark. This was nailed with the solution to the wireless problem described next.
- Wireless would be ideal. This appeared to be beyond my skills and/or experience in electronics, but I found a toy at Toys 'R' Us that, appropriately modified, was wireless and sensed motion. It's called a SpyGear Wireless Tracker. This also had some issues when used in this way. For example, when triggered, it had a blinking red light (LED) that continued to blink until manually reset. That made my job with the glue circuitry a lot more complex.

- Plays back a recorded message. This appeared to be the easiest to accomplish. Radio Shack, in fact, sells a voice recording/playback module for about $10 (above). This device was almost perfect. The difficult thing about it was that it had a rubber plunger switch to playback with no leads or any apparent way to hook into and trigger it from other circuitry. So I had to take the switch apart, drill tiny holes in the PCB for the wires and solder them directly onto the traces underneath. Not ideal. Sound quality is not great, but then I didn't really expect that much.
Finishing Up

The receiver mess (with voice record/playback unit) in nearly completed form.
Getting the glue circuitry working correctly was a pain, in the end I went for an inefficient but dead simple approach that made all the pieces work together. Maybe in the future I'll refine it. Anyhow, for now, I'm pretty happy with it.
More to come on the fun we've had.. !
Tuesday, July 08, 2008
What the @#$*! is that Noise?
The Art of Pranking at EA
Video. Fine moments in pranking at EA Tiburon. You'll see narration by my former manager, Rob Hyder, who pulled off perhaps the finest prank ever here - The Disappearing Door.
Our prank may not be as cool as some of those, but we're still refining it. The target? Fazeel Gareeboo, my manager.
1. Misdirection
Fazeel was out for two weeks, so he was likely expecting some sort of prank. So we had to do something obvious. There's a certain report that Fazeel hates, so of course we papered his cube with it.
2. The Idea
The real idea was to set up an annoying noise that went off whenever the target scooted his chair in to work. Fortunately, Fazeel sits next to the window. So I made a detector that set off a sound whenever a shadow is cast on it. Camouflaged the detector by hollowing out an electrical adapter and used the wire from the adapter to connect with the control circuitry and the buzzer.

Then we taped the buzzer box (yes, made from a Wal-Mart soapdish) to the back of Ryan Burkett's monitor. The box sported a switch so that Ryan could flip it on and off at will.
We got three solid days of torture out of that baby! Yeah!
So, of course, I built a bigger, badder, wireless version with voice playback that I'll post about later.
Tuesday, July 31, 2007
NCAA 08's Video Highlights
I'm pretty proud of this one. ;)
Thousands of user-created videos from NCAA Football 08!
http://www.easportsworld.com/#canvas_TopVideos
I posted this on 4/12/07:
I've been working on a little something special in NCAA Football 08. An NCAA Football 08 First Look article by GameSpot details the surprise. So now that it's public..
".. Once you've found a highlight you're particularly fond of, you can then choose to create a highlight of that play. This lets you choose from multiple camera angles to take a snapshot or segment of game-generated video. From there, you can either save these photos or videos on your hard drive or upload them to share with friends. .."
About the middle of last year, I was asked to do some R&D for this technology. Not long after that we were building it. Still, it came really close to being cut on a number of occasions. There were times when it seemed impossible to satisfy all of the below constraints and still produce a video of acceptable (or any) quality. I had taken some time off for a bit of surgery as NCAA was finalling and came back to find some bugs in my .flv encoder. So, I was a little paranoid that some random, unforseen issue might render the whole feature unusable in the shipped game.
Constraints
There were some wicked constraints putting this one together including -
Compromises
All in all, I think we struck a reasonable balance and it works. It's exciting to see people this jazzed about it! This technology is now quite the buzz around EA and next year we'll be seeing it in a lot more titles.
Will this technology and its descendants usher in the Web 2.0 era in console sports gaming?
I hope so!
Update Jan 3, 2008
Check out #2 on this list at pastapadre.com.
.. Launching with the release of NCAA Football 08 [EA Sports World] was an immediate success as fans of the game utilized the screenshot and video uploading features and it became one of the most positively responded to new additions to any sports game in recent memory. ...
For video highlights and optimizations geared at getting our football games to 60fps on PS3 starting with NFL Tour, I was nominated for the 2007 Outstanding Achievement in Engineering award for EA Sports - Tiburon. :)
Tuesday, June 26, 2007
EASTL
EA genius and colleague Paul Pedriana published a paper to the C++ Standards Committee detailing his EASTL, an EA version of the Standard Template Library that provides a number of efficiencies with game development in mind, but that are nonetheless applicable across other software domains.
I've always been a fan of the STL in general, and since I've been at Electronic Arts, of EASTL. It's nice to see some of these innovations get out into the world.