Comfortably Dumb

Typical blog fare for family, work, gadgets, music, and games.

August 2007 - Posts

For the record, the Market Restaurant & Bar in Del Mar has my seal of approval. The Kobe Flat Iron Skillet Steak is truly ridiculouos. The bread pudding fans might like to know that the bread pudding at the DoubleTree in Del Mar is also very nice.

Posted by Chris | with no comments
Filed under:

I finally got home on Friday and after waking up I ran my tests. Here is the average time to solve over 10 runs and excluding the first run on the machine to keep the JIT compilation time from affecting the average.

  • Dual Processor x86 @ 1.5 GHz with 2 GB RAM averaged 2.321 seconds
  • Dual Core x86 @ 2.16 GHz with 4 GB RAM averaged 0.855 seconds
  • Quad Core x64 @ 2.66 GHz with 4 GB RAM averaged 0.421 seconds
  • Quad Core x64 @ 3.2 GHz with 4 GB RAM averaged 0.351 seconds

Obviously, these numbers are significantly lower than what I discussed the other day. When I went multithreaded I noticed I was bottle-necked on my dictionary where I stored the list of boards that have been explored. You have to explore ~23,000 boards so I moved the board key generation outside the lock and got significantly less contention. In this process I also realized that if I am exploring that many boards and all their blocks, then I am creating more than 920,000 reference or struct copies. So, I went back and made every private method in my solving engine class only accept ref arguments and bam!

Posted by Chris | 1 comment(s)
Filed under:

After I finish the Pegs and ThoughtWorks tabs, PuzzleSolver will go into retirement. It has served me well, but I need a new project that will truly exercise the complexities of the enterprise space. It is extremely ambitious but I’ve decided to reinvent the wheel and create a first-class Chess program. This is my initial list of features:

  • Web Client – Information, registration, download, stats, and playable games against opponents using any supported interface or against the Chess service. AJAX and Silverlight will be featured here.
  • Windows Client – Richest Chess interface built using WPF and 3D rendering. Will be able to play against the local machine, opponents on the LAN, opponents using any supported interface, or against the Chess service.
  • Mobile Client – Play against the device, against opponents using any supported interface, or against the Chess service. Compact Framework version is a definite but I’m debating a mobile Web version.

I envision that I will make this publicly available for the community. I’d like to support some of the defacto Chess standards like Portable Game Notation (PGN), some game server interfaces, and Chess user interfaces like WinBoard.

Francisco

I’m debating whether or not I should write a Java interface as well. I am leaning towards doing it to further prove the interopability story and just to keep up with what the Java camp is doing.

On the backend, there are many things I could do for my own personal exploration like incorporating MOSS for dashboard reporting using the BI capabilities in SQL Server. It may be pie in the sky, but there are a lot of benefits to solving certain scenarios on my own before I tackle them with customers.

Posted by Chris | with no comments
Filed under:

Scan0002

Those of you that know me, also know that I keep this program called PuzzleSolver up to date on the latest technology. This forces me to learn the new technology and gives me a benchmark application to test the raw performance of the latest platform. You may recall that the last version of PuzzleSolver contained a Java client, a WinForm/CAB client, an ASMX endpoint, a WCF (Indigo at the time) endpoint, a WSE 3.0 endpoint, a Remoting endpoint, and a J2EE endpoint.

 PuzzleSolver

I was able to prove I could use the same service and expose it through any type of endpoint on the Microsoft stack without changing any code. Moreover, I proved I could invoke a Java endpoint with the same code that invoked my Microsoft endpoint. I also had a Java client that demonstrated the reverse scenario.

After that I started my WPF version of PuzzleSolver back in the first half of 2005 when it was still called Avalon.

PuzzleSolverAvalon

It was very rough, but it worked. I’ve finally completed the pure WPF version. It doesn’t consume services and doesn’t use Acropolis. While previous versions were developed and executed on a dual processor workstation and the solving engine ran on a separate thread from the UI it was still a single threaded engine. With the emergence of dual cores and quad cores, I decided to make this version completely multi-threaded.

PuzzleSolver-Blocks-FirstBoard

By taking advantage of generics and few algorithmic modifications I got the solution time down to ~2.25 seconds on dual core 2.1 Ghz HP laptop. By refactoring to take advantage of the ThreadPool the solution time has come down to ~1.8 seconds on the same machine. That is a pretty significant increase in performance. I can’t wait until I get back home to run it on my overclocked quad core and see what the numbers look like. I still have the dual processor workstation, so I’d like to see how much time comes off the 23 seconds solution time the CAB version posted.

PuzzleSolver-Blocks-LastBoard

You may notice that I’ve added tabs. They are still a work in progress and are currently disabled. The Pegs tab will solve the game at Crackerbarrel where there pegs are on a triangle board and one peg is missing and you objective is to remove pegs by jumping over them and have the last peg end up in the hole that was originally empty. I’m considering doing this one in 3D. The ThoughtWorks tab is for my personal enjoyment. I submitted a resume to ThoughtWorks back in 2003 and they sent me a logic puzzle and I was supposed to write a program to solve it. I turned the program around in two days and they never called me back. I guess they thought I cheated or something.

Posted by Chris | 2 comment(s)
Filed under:

I’ve been in SD for the past three weeks. I live in Florida, so I am not that excited about the beaches, but I am impressed with the Mexican food. For some reason good Mexican food is nonexistent in Florida, seriously. The place to hit in SD is the Old Town Mexican Cafe in Old Town. Sure many places have good beans, or good tortillas, or a good margarita but this place manages to put everything together. Good mix of Cheddar Jack cheese, onions in the cheese enchiladas covered with chili sauce, homemade taco shell that is ridiculously tasty, and a 1800/Grand Marnier margarita that is extremely light on the margarita mix.

Posted by Chris | with no comments
Filed under: