Prophet is back

After a VERY long absence from server play, the rewrite of my chess engine Prophet is finally far enough along to play some games online. The engine itself has been capable of play for a little while now, but I’ve establishing a testing routine and wanted to get an opening book.

Previous versions of Prophet had a custom book format, using fseek() and the like on a binary file. I may go back to that at some point but right now Prophet 3 uses SQLite to query the book built for chess4j.

Anyway, the engine has been online ICC most of the day:

67: + 1632 W 1469 brittabeast [ br 5 3] D11 Res Nov 30 16 15:29
66: + 1622 B 1479 brittabeast [ br 5 3] B03 Mat Nov 30 16 15:23
65: + 1611 W 1466 ituchesstech [ br 5 3] D08 Mat Nov 30 16 15:13
64: + 1600 B 1533 Knipshun [ br 5 3] A00 Res Nov 30 16 14:56
63: + 1586 W 1547 Knipshun [ br 5 3] C00 Res Nov 30 16 14:53
62: + 1570 B 1563 Knipshun [ br 5 3] A00 Res Nov 30 16 14:49
61: + 1553 W 1092 Darkpower [ br 5 3] A04 Res Nov 30 16 14:42
60: + 1551 B 1094 Darkpower [ br 5 3] B00 Res Nov 30 16 14:37
59: + 1549 W 1096 Darkpower [ br 5 3] D35 Res Nov 30 16 14:33
58: + 1547 B 1098 Darkpower [ br 5 3] B02 Res Nov 30 16 14:29
57: + 1545 W 1100 Darkpower [ br 5 3] C41 Res Nov 30 16 14:23
56: + 1543 B 1102 Darkpower [ br 5 3] B07 Res Nov 30 16 14:16
55: + 1541 W 1104 Darkpower [ br 5 3] D31 Res Nov 30 16 14:14
54: + 1539 B 1106 Darkpower [ br 5 3] B06 Res Nov 30 16 14:04
53: + 1537 W 1108 Darkpower [ br 5 3] D37 Res Nov 30 16 13:59
52: + 1534 B 1111 Darkpower [ br 5 3] B01 Res Nov 30 16 13:53
51: + 1531 B 1520 zalk [ br 5 3] A00 Res Nov 30 16 13:50
50: + 1514 W 1537 zalk [ br 5 3] B06 Res Nov 30 16 13:45
49: + 1495 W 1233 TT [ br 5 3] A04 Fla Nov 30 16 13:33
48: + 1695 B 1431 amr [ Br 2 1] B00 Mat Nov 30 16 13:28

20/20 isn’t too bad! Granted, it helps that it was vastly underrated, but still…what fun 🙂

Posted in Computer Chess, Prophet | Comments Off on Prophet is back

Swafford Family Tour de States – Chapter II Part I

On May 17th we set out on the second leg of our Tour de States. This time our focus would be on the Northwest. We would start out going through Tennessee and up through St Louis MO, then across to Kansas, through to Colorado, Utah, Oregon, Washington, and back along the northern most states- Montana, Wyoming and the Dakotas, before heading back south and east. Everyone was super excited about this trip. Neither Amy nor I had ever been to that part of the country before.

We didn’t have the smoothest of starts to this trip. The evening before leaving, as I went to hitch up the truck, the tongue jack wouldn’t lift the trailer high enough to clear the ball hitch on the truck. I scrambled to the Tractor Supply store to get a tongue jack that, though it does the job, isn’t quite what you want for a travel trailer. With some help from my brother-in-law Rob and a little luck we got the new tongue jack put on and we managed to leave on time (almost). In hindsight, that seems to be a foreshadow of things to come. There were definitely more maintenance issues on this trip than the last!




Just like last time, there would be a mix of travel days, sight seeing days, work/school days, and sometimes combinations of those. It didn’t take us long to get back into a rhythm once we were on the road. We wanted to stop and see some family in NC, TN and MO on the way out west, so that was the focus of our first few stops. Here are the stops we made on the way out west:

May 17-18 – Lexington NC – We stopped here to see Amy’s stepmother Gale. We spent a nice day at the house visiting. We went out for a meal at a nice restaurant. It was good to catch up.

May 19 – Newport TN – This was just an overnight stop in the mountains on the way towards Nashville. On our last trip we actually went down to Atlanta and then back up to Nashville just to avoid the mountains, but I figured that after 8000 miles or so of pulling that trailer I’d be OK. Besides, we’d have to go through the Rockies!

The campground was one of my favorites… definitely somewhere we could have spent more time. Pictured below is Jamie cooking up our supper! I think we were having cheeseburgers.


May 20-23 – Nashville TN – My dad’s side of the family are in the middle TN area so seeing family was definitely the primary agenda in Nashville. We managed to see my grandmother, sisters Fallon and Hillary along with their kids, as well as my aunt Carla. We also squeezed in a trip to the Parthenon.




May 24-26 – Bowling Green KY – Bowling Green is the home of the famous Mammoth Cave. Carlsbad Caverns was one of my personal highlights of the last trip so I was really looking forward to this. There are around 400 miles of caves in this system! Of course only a small portion of that is open to the public.

We set out on a tour, and as we got just about to the bottom, in a fairly narrow “corridor,” the group suddenly stopped. We stayed in place for 20-30 minutes before a Park Ranger came through saying that “we have a situation, law enforcement might be coming behind you.” Wait, what!?! That’s all the information we had for several more minutes before we learned that someone had fallen, possibly dislocating a shoulder so they didn’t want to move them. Our tour guide said that was the first time in 17 years that tour had been stopped – we just hit the lucky day! So, we “backed out” of that cave, but they put us on another tour that technically wasn’t even open to the public just yet.



May 27-30 – St Louis MO – my mom and sister Amanda both live in southeast MO so they were able to come spend time with us over the (Memorial Day) weekend. Being a summer holiday weekend, the campground was very busy. We ended up with a pretty good spot though, on the back end of the campground overlooking a cemetery! (At least the neighbors were quiet!)

We arrived at the campground on a Friday afternoon. That Saturday my sister Amanda, her daughters Cheyenne and Leah, and my sister Hillary (from TN!) with her family came up to see us. We went to a kid’s museum in St Louis, and of course the Gateway Arch. The Arch was a neat experience. The elevator that goes to the top has these little “pods” that look like something out of a sci-fi movie. Each “pod” seats about 5 people. You get out at the top, walk across a breezeway of sorts (though it’s anything but breezy, it’s actually pretty hot and stuffy) that overlooks the city, then get back in the elevator to go back down. The architecture and engineering are pretty amazing.





Shortly after that whole crew left us my mom came up and spent a night with us. We took a trip over to Grant’s Farm. The property was once own by Ulysses S. Grant and now owned by Anheuser-Busch.




May 31-June 2 – Kansas City MO – The main thing we wanted to do in Kansas City was go to Union Station. Union Station is, well, a big ole train station full of shops and exhibits. When we walked through it was just about empty. It’s striking how tall the ceilings are. It’s truly a beautiful building. After walking through the building we walked through a pedestrian crossing over the tracks on our way to Jack Stacks Barbecue.



June 3-6 – Omaha NE – We were really looking forward to getting to Omaha to see our good friends from our San Diego days, the Phipps family. It’s been a long time since we’d seen them but you wouldn’t have known it, we just picked right up like we’d just seen them last week! Jason and Candice were very welcoming and hospitable. We ate a great meal with their family and thoroughly enjoyed the evening! We just hope it’s not another 10 or 15 years before we see them again!

One negative note about Omaha – we caught a flat on the trailer. The road going into Omaha was so bad and bumpy that we didn’t even know it! It wasn’t until we made a left turn about a mile from the KOA we were staying at that I saw the tire in the mirror. Unfortunately this wouldn’t be the last flat either.



June 7 – North Platte NE – Just passing through here on the way to Denver!

June 8-10 – Denver CO – I was really looking forward to our stay in Denver – the Mile High City! We didn’t actually stay in Denver, but just west of Denver in Central City. Central City is in the Rockies and sits at about 8500 feet. The view was gorgeous! The campground in Central City was one of my favorites, but it was a challenge to get up to it. There were several switchbacks and sharp turns up some pretty steep climbs.

Before we left home Amy had already looked ahead for any opportunity to see the San Diego Padres play and this was it! They were playing the Rockies while we were in Denver, so naturally we went to the game. We (mostly Amy) were one of just a few rooting for the Padres, but they won!





June 11-12 Silt CO – After leaving Denver and continuing west we had to climb up to just about 11,000 feet in elevation. Trucks were having to go slow to avoid overheating (including us). At one point going down some elevation our brakes started smoking. It was a real balancing act keeping the truck slow enough to maintain control and not smoking the brakes.

One of our favorite activities of the entire trip was in Silt. We ziplined over the Colorado river! We also celebrated Father’s day in Silt by hiking along the river.



June 13-14 – Vernal UT – AKA Dinoland! Vernal’s “claim to fame” is the dinosaur bones found in the area. We went to the National Park where they have a structure built onto a rock wall with bones still embedded into it. The theory is that there was a river in that area where the bones had collected. Pretty incredible place.



June 15-20 – Salt Lake UT – On the way to SLC we came across the famous Bonneville Salt Flats. It’s literally a huge flat area of … salt. Many land speed records have been set here. It was pretty cool to just walk around on the salt. It was so bright that you had to squint.

Of course we also had to visit the Great Salt Lake. We took a short hike around a section of the lake, ate lunch and then ventured down onto the beach. The water in the Salt Lake is very warm, and obviously salty. Nothing lives in the lake except brine shrimp. Amy bottled some of the water, and several brine shrimp were in the bottle. Most died but one hung on for quite some time. She named him Fred. Sadly, Fred died just a few days ago in a sea monkey aquarium in our home in NC. He lived a pretty long and adventurous life for a brine shrimp!



June 21 – Winnemucca NV – the road between SLC and the west coast is long and barren! You can see in the picture below the sign that read “Next Gas 179 Miles” !! There was very little on that road and hardly any cell reception. It’s definitely not somewhere you’d want to breakdown! Thankfully we made it through without any trouble.

Every time I think of Winnemucca I also think of the Johnny Cash song “I’ve been everywhere.” We would play that song in the truck naming off the places we had been.


June 22-24 – Klamath Falls OR – Home of Crater Lake. Crater Lake is easily, without a doubt the most beautiful place I’ve ever seen. The lake sits on an “imploded” volcano, and the water is nearly 2000 feet deep. It’s the deepest lake in the US and the 9th deepest lake in the world. The depth of the water makes it an incredible blue. There is no “feed” into the water – it’s filled just off rain and snow runoff. This area get a LOT of snow – over 10 feet a year. We drove about half way around the lake, stopping at different points to look at the lake from another point of view (the road on the other half was still closed from snow!). I hope to return to this area again one day, it was truly stunning.



That’s all for this installment. I’ll write about the rest of this trip in another post soon!

Posted in Travel | Comments Off on Swafford Family Tour de States – Chapter II Part I

Error Establishing Database Connection in WordPress

My website (and a couple others on the same server) had been plagued with this mysterious ‘Error Establishing Database Connection’ for several weeks. I actually thought I had exhausted the system resources of my small web server and probably needed to upgrade it (add more RAM). I hadn’t considered the possibility that something more devious was going on, but it turns out my WordPress installation was vulnerable and was being 0wned!

This particular attack utilized the XML-RPC capabilities of WordPress. RPC is short for ‘Remote Procedure Call’. It’s a mechanism to execute procedures on a remote computer as if you were running locally. It’s a pretty powerful mechanism, but can be fairly dangerous too.

There are a few fixes published on the Internet. One solution was to enable Jetpack‘s security features. I tried it and it didn’t work. What did work for me was a two fold strategy.

1. Use a firewall to specifically deny the IP addresses of the attackers. I would consider this the first line of defense — it works at the lowest possible level. The problem with the Jetpack solution is that it works at the application tier, which consumes more system resources, leaving you open to denial-of-service type attacks.

I’m running Apache on an Ubuntu server. To find the IP addresses of the attackers, I did something like this:

fgrep '"POST /xmlrpc.php HTTP/1.0" 500 585 "-" "Mozilla/4.0 (compatible: MSIE 7.0; Windows NT 6.0)"' /var/log/apache2/access.log | cut -d' ' -f1 | sort | uniq

Once I had the IP addresses I installed Uncomplicated Firewall, and added a rule for each IP address.

sudo ufw insert 1 deny from
sudo ufw insert 1 deny from
sudo ufw insert 1 deny from

That alone helped dramatically, but doesn’t stop someone coming in from another address, so another step was needed.

2. I explicitly reject any web request for xmlrpc.php. You can do this using an .htaccess file, or directly in the web site configuration (in my case in /etc/apache2/sites-enabled). I added the following snippet to the bottom of the virtual host file(s). (I believe you could also do this globally if you didn’t want to do it per-site.)

<files xmlrpc.php>
order allow,deny

Note, this disabled XML-RPC and therefore any features/plugins that require it! However, it works fine for my purposes. YMMV!

Posted in IT | Comments Off on Error Establishing Database Connection in WordPress

vprintf segfault on Ubuntu Linux 15.10

I have a C program with a ‘print’ function that accepts a format string and variable list of arguments, similar to printf style functions. The function simply prints to stdout and also to a logfile.

void print(const char* format, ...) {
	va_list args;
	fprintf(logfile,"%d ",milli_timer());

Everything seemed fine compiling with g++ under Cygwin, but would crash when compiled on Ubuntu Linux 15.10. After a bit of digging I finally spotted the problem in the documentation for vprintf:

Internally, the function retrieves arguments from the list identified by arg as if va_arg was used on it, and thus the state of arg is likely altered by the call.

Apparently this is one of those things that is compiler specific. Since we can’t rely on the state of the arguments list after the first call to vprintf, the solution was simply to use a new arguments list for the second call to vprintf which writes to the log file. Revised function:

void print(const char* format, ...) {
	va_list stdout_args;
	va_list log_args;
	fprintf(logfile,"%d ",milli_timer());

Hope that helps someone.

Posted in Software Development | Comments Off on vprintf segfault on Ubuntu Linux 15.10

local array causes segfault

Recently while working on a C program I was intermittently getting a segfault. The code appeared correct yet it would inexplicably crash, seemingly at random. I compiled the program with the ‘-g’ flag to enable debugging symbols, and discovered I was dealing with the dreaded stack overflow.

Exception: STATUS_STACK_OVERFLOW at rip=00100414BC6

The line of code in question was the declaration of a large local array. Something like:


The fix was really simple. I just replaced that line of code with this one:

int* foo = malloc(REALLY_BIG_NUMBER * sizeof(int));
// later on...
free(foo); // <--- very important!

That's it. The difference is the area of memory that the data is allocated in. In the former example (the local array), the compiler used stack memory. The stack is an area of memory used for temporary variables created by each function. By allocating a large array, I tried to fit more into the stack than it could accommodate, hence the 'stack overflow'. In the latter example, a different area of memory is used called the heap. The heap is not as tightly managed and is somewhat larger.

Posted in Software Development | Comments Off on local array causes segfault

chess4j 3.0 is released!

After a long period of inactivity I’m happy to announce the release of version 3.0 of my Java chess program, chess4j. This version is a good bit stronger than the previous version, though still not as strong as my C/C++ program Prophet (see below). The key areas of improvement are:

  • The addition of an opening book, which I discussed here.
  • Improvements in the positional evaluation function
    • Passed pawns are rewarded
    • Isolated pawns are penalized
    • Doubled pawns are penalized
    • Rooks on open files or half open files are rewarded
    • Rooks and queens on the 7th rank, particularly when connected to another rook or queen are rewarded
    • There is some attempt to keep the king sheltered until the endgame, and then encouraged to move towards the center
  • Almost 2x speed increase

The table below compares the performance of chess4j v2 against v3 on several different test suites. Each suite was run twice and the results averaged. I highlighted changes of +10% or more in green (good), and -10% or more in red (bad). The top 4 suites are tactical suites. There weren’t any significant changes here, despite the 2x speed increase. However, the ‘SBD’ suite and all the ‘STS’ suites below that are positional suites, and there were some differences there. Key areas of improvement (according to these tests) were ‘undermining’, ‘open files and diagonals’, ‘bishop vs knight’, ‘offer of simplification’, and ‘queens and rooks to the 7th rank’. The one suite marked in red measures advancement of the f/g/h pawns. I think the added king safety code has something to do with that: the program is less willing to push those pawns if the king is castled on that side.

Suite/Time v2 raw v2 % v3 raw v3 % Delta raw Delta %
WAC/5 258 86.0% 266 88.7% 8 2.7%
WAC/10 270.5 90.2% 273.5 91.2% 3 1.0%
WCSAC/5 775 77.4% 784.5 78.4% 9.5 0.9%
ECMGCP/10 35.5 19.4% 37 20.2% 1.5 0.8%
SBD/60 45.5 34.0% 96.5 72.0% 51 38.1%
STS1/5 30 30.0% 48.5 48.5% 18.5 18.5%
STS2/5 19.5 19.5% 39.5 39.5% 20 20.0%
STS3/5 45 45.0% 41.5 41.5% -3.5 -3.5%
STS4/5 36.5 36.5% 41.5 41.5% 5 5.0%
STS5/5 41 41.0% 59.5 59.5% 18.5 18.5%
STS6/5 47 47.0% 48 48.0% 1 1.0%
STS7/5 22.5 22.5% 33 33.0% 10.5 10.5%
STS8/5 31 31.0% 20.5 20.5% -10.5 -10.5%
STS9/5 30 30.0% 37 37.0% 7 7.0%
STS10/5 55.5 55.5% 57.5 57.5% 2 2.0%
STS11/5 19 19.0% 28 28.0% 9 9.0%
STS12/5 42 42.0% 48.5 48.5% 6.5 6.5%
STS13/5 45.5 45.5% 48 48.0% 2.5 2.5%
STS14/5 31 31.0% 62.5 62.5% 31.5 31.5%
STS15/5 22 22.0% 29.5 29.5% 7.5 7.5%

The table below shows chess4j’s performance in a head-to-head match verse four other engines (the bottom one being my engine, Prophet). The match conditions were: only one processor could be used, no thinking on the opponents time, and no opening book libraries or endgame tablebases. The matches were done using a set of 20 starting positions called the ‘Nunn Test Suite’. The engines play from each position twice- once as white and once as black, making the entire match 40 games. One thing that may jump out is that the results don’t seem consistent. Why the variability against the same opponent using different times? It very well could be that chess4j is better at longer time controls, but it would take thousands of games to prove that theory. This game set is too small to be statistically significant. The main point was to get a feel for how strong the engine is.

Opp 1 min 3 min 10 min
Gerbil 5-31-4 9-23-8 10-23-7
Horizon 4.3 6-31-3 8-28-4 4-31-5
Lime 6.2 5-32-3 4-29-7 6-29-5
Prophet 2.0e 2-32-5 4-35-1 2-35-3

While there is certainly a lot to do with the evaluation, it’s not so far behind Prophet’s that it would explain such a lopsided result. I’m afraid the main disadvantage chess4j has comes down to speed. On my laptop I typically see chess4j search between 180,000 and 200,000 positions per second. That may sound like a lot but this (32 bit compile of Prophet) searches between 800,000 and 1 million positions per second (and there are programs out there that search much faster than that!). To test that theory I ran another set of matches against the same opponents using time odds. In the table below, the 2x, 4x, and 8x columns show how chess4j would fare in a 1 minute match if it were 2x, 4x, or 8x faster than it is now. As you can see, if chess4j were 5-10 times faster than it is it would be much more competitive against this group.

Opp 1 min 2x 4x 8x
Gerbil 5-31-4 10-22-8 12-21-7 21-8-11
Horizon 4.3 6-31-3 8-26-6 11-21-8 12-21-7
Lime 6.2 5-32-3 6-30-4 14-20-6 16-12-12
Prophet 2.0e 2-32-5 6-29-5 10-27-3 15-9-6

Is it possible to make chess4j that much faster? Maybe. I was able to improve the speed of this version by a factor of two by doing a careful analysis of the data structures being used (mostly Collections stuff, like ‘ArrayList’ vs ‘HashSet’ and such), and looking up their runtime complexities for different operations (like adding, or iterating…) and changing the data structures where appropriate. But, I think I’ve gone about as far as I can down that road. This is a Java program after all. It’s not as “close to the metal” as a C program. I think to squeeze much more out of I’d have to scale back on how much object instantiation it does. But then it would look less like an object oriented program, and would probably be less readable and possibly harder to test… all of which go against what I want to accomplish with this program.

So, what’s next? My next areas of focus are:

  • It’s time to establish a proper testing routine. Meaning that, going forward, all changes to the program need to be measured in terms of ELO gain. This is a lot harder than it sounds but it will ensure changes are good changes.
  • Add a pondering search. Instead of sitting idly as the opponent is on move, try to guess what the opponent is going to do and start formulating a response. If we’re right often enough we can allow more time to think about each move.
  • Use all the machine’s processors! Most computers these days have multiple processors, yet chess4j is only capable of using one. (using multiple processors is easy. doing it efficiently [in the context of a computer chess] is MUCH harder than you might think)

If you’d like to try your hand against chess4j, you can download it from the
project website. It’s a console program though, not graphical. However, you can download a GUI and set it up to use chess4j… see the readme.txt file.


Posted in chess4j, Computer Chess | Comments Off on chess4j 3.0 is released!

Swafford Family Tour de States – Chapter I Part II

This is part 2 of a post where I was describing a trip my family and I took across the southern part of the United States. If you missed it you can click here to read it.

Oct. 18-21 – Visalia CA. We finally got out of the desert on this stop. Just two days before traveling through this area one of the roads we would have been traveling on was covered over with mudslides. This massive mudslide kept a major road closed for days as crews worked to unearth the road. Unfortunately some people did lose their lives, so we were really thanking God that the timing of our trip wasn’t just a little different. We ended up detouring around the closed section, on a road not really suited for bigger vehicles. I remember being high up on a mountain area with heavy fog and limited visibility. Not fun!

This stop and the next are in the central part of California, around the Sierra Nevada mountains. The main attraction in Visalia was to be Sequoia National Park. This is the home of the giant redwoods. The largest tree in the world is here – the General Sherman, in Sequoia’s Giant Forest. Some of the trees here are up to 3000 years old. Its incomprehensible how old and big these trees are. There are lots of trails in the Giant Forest. We took one just a few miles long called the “Congress Trail.”




Oct. 22-25 – Coarsegold CA. Coarsegold is a little less than 100 miles north of the Sequoia area, east of San Francisco, close to Yosemite National Park. The KOA campground was probably my favorite. A lot of the campgrounds are really more “RV parks” than campgrounds, but this one was large, spread out, and really had more of a camping feel to it. Not long after getting there we noticed a lot of quarter sized holes in the ground. We discovered that these are tarantula holes! Apparently this area is known for their tarantulas!! They were even having their annual “Tarantula Festival” that very weekend!!! Jamie spotted one as he was riding around on his bike. Fortunately though, we arrived at the very end of the season so we didn’t see any more, to Amy’s great disappointment.

We had one day set aside to drive into Yosemite. On the way in, just outside the park we came across the Sugar Pine Railroad. This railroad was once part of a logging operation. Today it’s a tourist attraction, offering one hour rides on restored steam locomotives through the areas that were once logged.

Yosemite is one of the most beautiful places I’ve ever seen. The park covers a large area but there are only a few gates. Inside the park there is a large loop that circles around a valley area, with breath taking views. The trees are tall, with giant cliff faces and waterfalls all around. Towards the back side of the loop is a “village” with some shopping and eating. Unfortunately it was very busy while we were there, but I think it’s like that pretty much all the time now. Despite that we were able to find some quiet moments to just enjoy the scenery.




Oct. 26-30 – Paso Robles CA. As we left the Yosemite area we traveled south and west towards central California’s Pacific coastline. We finally made it to the “other side!”


We would be here for Halloween. We did a little decorating outside the trailer, and went downtown Paso Robles to do a little trick-or-treating.


Paso Robles is in the heart of wine country. There are lots of vineyards and wineries all around that offer tours and tastings, though we didn’t do any of that (it might be frowned upon with two kids). It’s also close to Hearst Castle, once the home of William Randolph Hearst. Hearst was a media mogul of the early 20th century. Anyone who was anyone in that day knew Hearst and spent time at his estate, which sits high up on a hill overlooking the Pacific ocean.




Nov. 1-6 Malibu CA. From Paso Robles we headed straight down the Pacific Coast into southern California. Amy and I used to live in San Diego so we were really looking forward to getting back to our second home. Honestly though I was a little intimidated about the traffic we would be facing, but by this time I had thousands of miles of experience pulling the trailer so we did OK. The views driving down the Pacific Coast Highway were really spectacular. At one point we had the ocean less than 100 feet to our right and a mountain less than 100 feet to our left! The campground we stayed at was set up on a hill with a nice view of the ocean. We were able to see the ocean from the trailer. Some days we would pack a lunch and walk down to the beach.





There was a state park called Solstice Canyon within walking distance from our campground. One day we walked up to the park and then did some hiking. There were two old, abandoned houses on the trails. One had been occupied as recently as the 1980s but was destroyed by fire.



One day we drove down into Los Angeles to the Le Brea tar pits. Le Brea is right in the middle of town, and is actually an active (bubbling) tar pit! Over the course of 10,000 years or so that tar pit has swallowed up countless animals, some that are extinct today, so there is a lot of excavation and research going on. There are areas that are roped off, with warnings that you’ll become a fossil too if you cross the line!



We also went to the famous Getty Art Museum. Amy said she was a little disappointed with it overall. Of all the things we saw at the Getty the thing we’ll remember best is the parking deck! It became evident pretty quickly that driving our big truck into that parking deck was a mistake, but there was no room to turn the truck around and too much traffic behind us to back out. The parking deck at the Getty goes down into the ground, not up like most. As it goes down the overhead clearance gets a little shorter. At one point there was a sign that said if you couldn’t get under the sign you were too high. We slid the moon roof in the truck back and crept forward, clearing that sign by a few inches! I think Amy almost hyperventilated. I pulled that trailer about 7,000 miles, but it was in the parking deck at the Getty that I scared her most.



Another day we drove into Hollywood. I was really not looking forward to this, as it’s very crowded and not really somewhere you want to drive a big vehicle. However, we did manage to get to a scenic view of the Hollywood sign, got into Hollywood, found parking, and walked around for a couple hours. There was a red carpet event going on, which we later learned was some kind of Latino radio awards.





Nov. 7-13 San Diego CA. We were very much looking forward to our stay in San Diego. We went to San Diego a few years ago on a family vacation, but it’s such a great city and there’s always something else to do. We pulled in on a Saturday, so the very first item on our agenda was to visit Pacific Beach Christian Church (our “second home” church) the next morning. We hadn’t told anyone we were coming so we were really hoping Pastor Brian and some of our old friends would be there. Brian was really surprised! And we did indeed see some old friends. The lady in the picture below with Amy and the kids is Leona. Her and her husband Ed were members of PB Christian in the late nineties when Amy and I were attending. The church has changed a lot since then, and most of the faces have changed, but it still felt like a homecoming to us. We had a meal with the Daly family later in the week at their home. It was so great to catch up with them.



There is a small cafe at the end of Ocean Bean (OB) pier that we used to eat at. Had to do it!



One of the things we love about San Diego is the beautiful scenery at Point Loma. There is a small Coast Guard station on Point Loma, and an old light house that is no longer used. The light house actually isn’t very tall at all. It didn’t need to be because Point Loma is already so high above sea level. As you walk around Point Loma you see picturesque views of the city and the bay. (I used to love pulling into that bay in my Navy days. I knew when we passed beneath the Coronado Bridge that we were almost home.) There are some really nice walking trails around Point Loma, with surprisingly little to keep you from plunging into the ocean below! We stayed around long enough to see the sun set over the Pacific, an absolutely gorgeous sight.









The Wild Animal Park (now known as the Zoo Safari Park) is world famous, for good reason. There are a lot of exotic animals there, and the grounds and landscaping are amazing. It is (or was) the home of the only black rhino in North America. There are only three other black rhinos in the world, all in Africa. Sadly this rhino died just days after we saw it. The species will soon be extinct.



We also went to Legoland! This had been a dream of Amy’s for the last 16 years! Construction on Legoland was completed in 1998, while we still lived in the area. Amy had applied but they took so long to even respond that she took another job. To this day she still plays with Legos. She’s passed her love of Legos on to Jamie.

I wasn’t really sure what to expect out of Legoland, but it was very much a theme park with rides, and of course massive displays constructed entirely of Legos. There are different areas of Legoland, each with a different theme to it. One area was entirely Star Wars. In another area, there were reconstructions of world famous cities, like New York, Paris, and New Orleans. The weather hasn’t been kind to these displays over the years but it was still really something to see.





When we left San Diego on Nov. 14th, it was a little bittersweet. We would be heading east, towards home. The trip was starting to wind down.

Nov. 14-17 Tuscon AZ. After a month of being in California we were finally back in Arizona, but further south than we were on the trip out west. Tuscon isn’t far at all from the Mexican border. There were two things on our agenda for Tuscon: to see the Airplane Boneyard and Tombstone.

Ever wonder where military planes go when they are retired from service? Most go to the Airplane Boneyard at Davis-Monthan Airforce Base in Pima. Since Davis-Monthan is an active Airforce base, one doesn’t just walk around at will. There is a museum outside the base that has an arrangement with the Airforce. The only way to view the boneyard is aboard a tour bus through this museum. There are acres and acres of planes here. Some could easily fly again, but other planes have been torn apart for their parts. The planes range from WWII era all the way up to modern planes. Unfortunately we couldn’t get off the bus and walk around the planes. The tour guide was a former military pilot and very knowledgeable about most of the planes out there.




Tombstone is of course the location of the OK Corral, where the Earp boys and Doc Holliday got into a gun fight with Billy Clanton and the McLaury brothers. The town has done a good job of preserving their history. There is an unpaved street with wooden walkways that has an old west feel to it. There are even a few saloons! We went to a reenactment of the gunfight at the OK Corral and ate at “Big Nose Kates” – a restaurant named for Doc Holliday’s girlfriend and in the location of the “Grand Hotel.” There is a graveyard just outside of town that you can walk through. Clanton and the McLaury brothers are buried here.






Nov. 18 – Las Cruces NM. Our next destination was Carlsbad, which was too far for one day so we stopped here overnight. By this point an electrical issue we were having with the truck was becoming a real problem. The turn signals had been starting to fail, and now were even malfunctioning to the point that a left signal would turn on the right blinkers! Las Cruces was going to the the last major town for a while but unfortunately none of the dealerships could get us in that day, so we said a prayer and pressed on.

Nov. 19-22 – Carlsbad NM. On the way to Carlsbad we drove through the Alamogordo and White Sands areas, then up through some mountain roads. On the way down the mountains I let the truck sort of “glide along,” trying not to use the gas at all. We were able to get up to 98 miles per gallon! If only we could maintain that!!

The KOA campground was a nice place, just north of Carlsbad and about an hour’s drive south of Roswell. The coldest nights of the trip were here. One morning I went to make coffee, and no water would come out of the faucet! The water hose completely froze up. I had to pull it off and stretch it out in the sunlight. I wasn’t happy about having to wait for my coffee.

Carlsbad Caverns was probably my favorite National Park. The entrance is just a big hole, like a cave. As you enter and start descending, the natural light slowly fades away until it’s completely gone. Of course the walkways are lit, but you can look off in the distance to see just how dark it is down there. The walkway descends around 800 feet or so, until you get to a large expanse known as the “big room.” The walk around the Big Room is about a 1 mile loop. The water pools there don’t move at all, yet they are crystal clear. One pool is known as “mirror lake.” There is an area known as the “bottomless pit.” Of course it’s not really bottomless, but it appears to be and must have really appeared so to early explorers.




We also went to Roswell, the location of all the alien sightings in the late 40s. Roswell is a small town, and naturally they play up their reputation. There are alien statues all over the place. The street lamps light up green and look like alien heads. There is a small (but interesting) ‘UFO Research Center’ museum in town that we visited. Here you can learn all about the sightings and conspiracy theories and judge what really happened for yourself.



Nov. 23 – Ft Stockton TX. Just passing through!

Nov. 24-28 – San Antonio TX. We spent Thanksgiving here. It was strange to not be with other family, but we had a good day together. We went out to eat at a really nice restaurant and then just spent a relaxed day with each other.

San Antonio is right in the heart of Texas. It’s a beautiful city. The Alamo is here, beautifully preserved in the downtown area. This was another opportunity to teach the kids some history by showing them firsthand. We started our tour of the Alamo by going into an old frame shop that’s right across the street. In this frame shop there was a large display of the Alamo as it once was, where (for a reasonable fee) the shop owner would tell you all about the battle. We then walked across the street, into the walls of the Alamo itself to see all these things. (Side note: if you’ve ever watched Pee Wee Herman — Ailsa asked an employee where the basement was. He wasn’t amused.) (Site note 2: I finally got the truck fixed here!)




San Antonio has a gorgeous downtown area. The river walk is lined with shops and restaurants.



There were also lots of hiking and biking trails within walking distance of our campground. Amy and I walked as the kids did some biking.



Nov. 29-Dec 2 – Houston TX. Houston is on the eastern side of Texas, near the gulf coast. It’s here that we noticed the land had shifted away from desert to green. It was starting to look and feel like home. The traffic in Houston is insane. Fortunately we weren’t staying in Houston, but just north of it, so I didn’t have to pull the trailer through all that crazy traffic.

We went to a zoo in Houston. The zoo is in their downtown area. It was a weekday (I think a Tuesday) and the weather wasn’t great, so it felt like we pretty much had the place to ourselves.



Houston, we have a problem! We went to NASA’s Johnson Space Center! For me, this was a childhood dream come true. We sat in a room that presidents have sat in, looking in on the Mission Control of the Mercury and Apollo days. It was truly awe inspiring to me to consider what had been accomplished using technology that is far inferior to an average phone today. Incredible! We were also able to tour a facility where real research is happening that is relevant to today’s space program.




We were also able to see (very closely) a Saturn V rocket – I believe the last. This is the actual rocket that was slated for Apollo 18, but the government shut down the program before it was launched. The thrusters are so big that it’s hard to fathom the power and force that comes from them as the rocket is launched.




There is also a museum just outside of NASA’s gates that has some really interesting displays. Space suits, moon rocks, shuttle mock ups, movies, and even an old Star Trek movie set.



One final random memory from Houston: we went out to eat one night at a steak house. It seemed like the parking lot was full of trucks. Big trucks. I was glad we had a big truck. I would’ve felt out of place without it!

Dec. 3-6 – Baton Rouge LA. Houston was our last sight seeing stop, but there was one more item on the agenda before going home. Amy has a lot of family on her dad’s side in the Baton Rouge area. We stayed at a nice campground around a lake.


On Saturday we went to her Aunt Beverly’s and Uncle Kenneth’s house. Lots of family came over to see us. Sunday we went to her Uncle Darryl’s and Aunt Minta’s house. Lots of family came over that day too! It was a great way to end the trip.

Dec. 7 – Toomsuba MS. There is just about 1000 miles between Baton Rouge and our driveway. We could have pushed to do it in two days, but we opted to do it in three. That was a good thing, because we had our first roadside incident on this day. We blew the right rear tire on the trailer. I got the trailer off the road but because of the slope of the road shoulder I couldn’t lift the trailer high enough to get the blown tire off. We had to call for help. Fortunately help arrived quickly and we were on our way.

Dec. 8 – Anderson SC. This was our first stop of the trip, and our last.

Dec. 9 – Farmville NC!! The state sign was a very welcome site! Everyone was super excited to that we’d soon be seeing family and home!


It turns out that the spare tire had a leak! This was the tire the morning after pulling into our driveway. The morning after that it was flat!


We estimate that we put about 7,000 miles on the trailer and about 10,000 on the truck. We saw and did a lot of amazing things. But, in the end it was the time together that made the trip so special. We are planning, Lord willing, to do a similar trip this year in the northern states. I can’t wait.

Posted in Travel | Comments Off on Swafford Family Tour de States – Chapter I Part II

Swafford Family Tour de States – Chapter I Part I

The Swafford family just got back from a 3 month, 7000 mile trip around the southern part of the United States. To say it was amazing would be an understatement. There is no way I can describe or capture the experience in words.. it was just simply an incredible, once in a lifetime opportunity that we were blessed to be able to do as a family.

Planning for the trip started somewhere around Nov. 2014. It was more of a thought or just an idea at the time. We saw that a friend had done something similar so we thought – why couldn’t we do the same? I’m able to work from anywhere, so the only real obstacle was that the kids would have to be home schooled. We decided we wouldn’t want to pull them out of school part way through the year so we started kicking around the idea of leaving in Sept. Weeks and months went by, and though it still sounded crazy, we never talked ourselves out of it. We were actually starting to make some plans. The idea was solidfying – it was really going to happen. We bought a big ole’ travel trailer in July of last summer, and a truck that could pull it, and on Sept. 14th we pulled out of the driveway on our big adventure.

The focus of our trip was the southwest. We wanted to focus on parts of the country that were just too far to get to otherwise. We wanted to see some Americana. There are all these things out there that you might not make a special trip for by themselves (the world’s largest rubber band?) – but taken together these things are all part of what makes America, well, America. The image below shows our tentative route. In the end it wasn’t exactly that but it’s close enough that I’m going to use it anyway.


For the most part we were going to follow along I-40 until we got out west. We wanted to follow along Route 66 for a while, then hit the Pacific coast, drop south into LA/San Diego, head back east along I-10 towards Baton Rouge LA, and from there north and east to home.

Now, keeping in mind that I have to work for a living and that our kids need an education, we couldn’t travel and see sights every day. Some days would have to be “zero days” — days spent in the campground taking care of business. There were a lot of those days. And honestly, we needed those types of days too. Being on the go all the time will wear you down. So, we got into a routine of sorts, switching between travel days, sight seeing days, and zero days (and sometimes combinations of those).

Here is the travel schedule we kept.

Sept. 14 – Anderson SC. Just an overnight stop. Our first destination was going to be Nashville, but that’s 700 miles from home – too far to drive in one day while pulling a 36 foot travel trailer. On top of that, I wasn’t crazy about the idea of driving through the Appalachians. We opted to add an extra hundred miles to avoid the mountains by going down through Atlanta, though in the end the traffic was probably worse than the mountains.

Sept. 15-17 – Nashville TN. Spent some time with James’s family. We got to see my Grandmother, my two sisters Fallon and Hillary along with their families, and ate a nice meal with my Aunt Carla.

I recall that the KOA campground in Nashville was an older RV park, not really suited for longer rigs, so it was not a very pleasant experience getting the trailer in there.





Sept. 18-19 – Memphis TN. My mom lives in southeast MO so she was able to drive down and spend a couple nights with us. The major attraction in Memphis is Elvis Presley’s Graceland. There is also the (in)famous Beale St. What I recall about Graceland was, honestly, how … unimpressive it was. Don’t get me wrong- it’s a nice house for sure, but for some reason I expected something a little bigger for a “mansion.” The house was really not all that large. It still has the 70’s decor from Elvis’s day. There are several buildings behind the house though, one of them with a hallway that houses all Elvis’s hit records (and there were many, many of those). Jamie actually came away from that an Elvis fan, at least for a while.


We also walked on Beale St, making true the lyrics of “Walking in Memphis.” There were some old shops, and of course a lot of bars, and some bikes. We ate at a Hard Rock Cafe.


Sept. 20 – Sallisaw OK – just an overnight stop on the way out west. I remember some hiking trails out there. This is where we noticed that the land was changing.

Sept. 21-23 – Amarillo TX – very windy! There weren’t a lot of trees, just wind and tumbleweeds! We ate at a very old Route 66 diner. I had a buffalo burger. This is the home of Cadillac Ranch.




Sept. 24-26 – Albuquerque NM – We saw some petroglyphs here, perhaps a few thousand years old left by ancient Pueblo peoples. It was a hot hike and we were on the lookout for rattlesnakes, but we really had the feeling that we were seeing some once in a lifetime stuff.



We also ate at this really authentic restaurant. I think it was the oldest in Albuquerque. Navajo tacos are good!


Sept. 27-29 – Holbrook AZ – During our first night in Holbrook there was a lunar eclipse.


There were two points of interest for us near Holbrook. The first was the Petrified Forest. We started to realize about 100 miles out that there wasn’t going to be a tree in this forest (or for miles around for that matter). But, who knew that millions of years ago the Arizona desert was actually a lush forest with raging rivers? The ground is rich with silica. Trees that fell into rivers became saturated with these minerals until eventually all the wood was gone, but rock remained.


We also went to see a mile wide meteor crater. This meteor impacted the earth around 50,000 years ago. You can still see the “ripple effect” the impact had on the ground. It was truly incredible.



Sept. 30-Oct. 4 – Williams AZ – The first thing I have to say about Williams is that this is where Ailsa finally learned how to ride a bike! We practiced in the campground and it finally just “clicked.”


Of course we went to the Grand Canyon. I knew that this was going to be one of the highlights of our trip. Amy and I had visited the Grand Canyon in 1996 with my brother Bobby, but the kids had never been. I remembered from back then a long trail that went down the canyon in a series of switchbacks, and then hiking along the plateau on the bottom to a point that overlooked the Colorado River. I didn’t remember the name of it but that was the famous “Bright Angel Trail,” and it’s the trail the family would hike on. Amy and Ailsa hiked about a mile and a half down (which is the hardest part by the way), then turned back while Jamie and I hiked a few more miles down to the Indian Garden. They did extremely well and Amy and I were both very proud of them.





Flagstaff AZ is about 30 miles east of Williams. Just south of Flagstaff are a series of Pueblo ruins. One of them is “Montezuma’s Castle.” Montezuma is actually an Aztec name, because it was originally thought to be Aztec. The ruins are settled into the side of a canyon wall. Unfortunately visitors haven’t been allowed in since the 1950s but it was still cool to see.


Also in the Flagstaff area were the Tuzigoot ruins. The main area of the settlement was set up on a hill (that’s where the important people stayed). It was really something to see how those people lived. We tried to get the kids to imagine what life must have been like for those people.



Oct. 5-9 – Cedar City UT – Cedar City is a small town in southwest UT, near Zion National Park. Zion is absolutely gorgeous. We went there to do some horseback riding, which was Amy and Ailsa’s favorite stop of the entire trip. We were able to book a 3 hour guided tour. We rode horses in a group of about 10-12 people through the desert canyons. I’m sure it’s something none of us will ever forget.





Oct. 10-12 Las Vegas NV – Las Vegas is such a weird town. It’s really this big city sitting in the middle of a scorching desert. Amy and I had been there before too. We wanted the kids to see it but of course you have to be careful going to a place called “sin city.” But, we were able to walk up and down the strip and see some sights, and even took them to the famous Blue Man Group show.







We also visited the Hoover Dam. It’s absolutely insane how large this dam is. We went on a tour into the bowels of the dam, way down in the generator rooms. At one point we were standing directly over the river raging through large pipes below us. The entire room was shaking with the power of the water below.




Oct. 13-17 – Needles CA – Needles, while in CA is still very much desert and HOT! There’s really not too much in Needles, but Havasu City AZ is about an hour’s drive. Havasu is famous for being the site of the London Bridge. It’s often confused with the Tower Bridge that still stands across the river Thames. The London Bridge really did come from London though, and at one time crossed the Thames. But, it was slowly sinking into the river (hence the nursery rhyme “London Bridge is falling down”). It was purchased by the city of Havasu in the 1960s for just a few million dollars. It was carefully dismantled, transported, and reassembled in exactly the same way it used to stand in London. This turned out to be a brilliant move by the city of Havasu, which has built an entire tourism industry around this bridge.


Also worth mentioning here is that Jamie did some offroad biking in the rocky desert around the campground, took a nasty fall and split his hand open. It was late on a Friday evening. We cleaned it up and closed the wound up with some steristrips. He has a small scar on the side of his hand to show for it but is otherwise OK. It didn’t keep him off the bike for long.

This gets us to about the halfway point of our trip. Read about the rest of this trip in part 2.

Posted in Travel | Comments Off on Swafford Family Tour de States – Chapter I Part I

chess4j + SQLite

The last time I wrote anything about chess4j, way back in November, I reported that chess4j was using a small in-memory database of opening moves. The program was reading a library of about 500 games from GM Kasparov, which it would do every time the program initialized. Before each move, chess4j would consult this in-memory database to see what moves have been played by Kasparov (or his opponent), and choose between them using a weighted random selection algorithm. The effect of this was that chess4j no longer played the same opening moves, so it added some variability to its online play. It also produced games that were a little more “aesthetic”, or pleasing to look at.

That was a huge step forward, but it had some limitations. Reading all those games takes a little time, so it isn’t really practical to read in more than about 500. It’s also expensive in terms of memory since they are all held in-memory, so there are some limitations there. Finally, it doesn’t leave any room for any learning algorithms since the program is initialized to the same state each time it starts.

To address those issues I needed a solution that persisted data to the disk. In past programs written in C/C++ I’ve created custom file formats and used fseek() and the like to probe it. This time I decided to use a proper database. I had considered MongoDB, mainly just to play around with it, but in the end I decided on SQLite. SQLite is lightweight, reliable, and fast – a perfect fit. (Side note: the primary author of SQLite, Dr. Richard Hipp, was roommates with my graduate school advisor, Dr. Ronnie Smith when they were both working on their PhDs at Duke University. I’ve met him… very nice guy.)

The database table to hold these opening book moves is very simple:

sqlite> .schema book_moves
CREATE TABLE book_moves (key int not null,fromsq int not null,tosq int not null,frequency int default 1,wins int,losses int,draws int);
CREATE INDEX idx_book_moves_key on book_moves(key);

Really, the only fields that are necessary are the first three: key, fromsq, and tosq. ‘key’ is used as a signature for a position. That is, every possible chess position has its own unique value for ‘key’. (I’m not going to get into the algorithm to do that in this post, just accept that it’s true!) ‘fromsq’ and ‘tosq’ are probably self explanatory – they represent the square the piece is moving from and the square it’s moving to. So, if we want to probe the opening book to see what moves it contains from any given position, we just produce the value of “key”, then perform the query:

select fromsq,tosq,frequency,wins,losses,draws from book_moves where key=?

‘frequency’ is a count of how many times the move was encountered as the opening book was constructed. This is what makes the random weighted selection possible. The idea here is that, if move A was encountered 10 times as often as move B, then chances are it’s a better move and I should play it roughly 10 times as often. This approach helps keep a stray “bad move” that may have found its way into the book database from getting on equal footing with good moves.

Finally, we have ‘wins’, ‘losses’, and ‘draws’. Each time chess4j completes a game, it increments the appropriate counter for the moves it played from the opening book (not moves the opponent played). It doesn’t actually do anything with this information yet, but future versions will probably use the information to avoid any moves it consistently loses with.

So, that’s a brief description of the implementation. To seed the database I found an online collection of about 50,000 games played by Master level players or above. The database I’m using currently has nearly 150,000 moves.

Watching chess4j play with this opening book is really fun. Since it doesn’t have to “think,” it plays almost instantaneously when it has a response in the opening book. Below is a segment from logfile. Notice how it begins with “c4”, then parses the opponent’s response “g8f6” and responds with “b1c3”. The frequency counts on the moves it encounters in its opening book gradually diminishes until it has no book response for “c7c6” and has to start thinking on its own.

# parsing: level 0 5 3
# level: 0, 5, 3
# setting increment to 3000 ms.
# parsing: name Pepo2424
# opponent is: Pepo2424
# parsing: rating 1989 1611
# parsing: time 30000
#time : 300000
# parsing: otim 30000
# parsing: go
# book move: BookMove [move=c2c4, frequency=8939]
move c2c4
# parsing: time 30300
#time : 303000
# parsing: otim 30100
# parsing: usermove g8f6
# book move: BookMove [move=b1c3, frequency=1520]
move b1c3
# parsing: time 30600
#time : 306000
# parsing: otim 30100
# parsing: usermove g7g6
# book move: BookMove [move=g2g3, frequency=182]
move g2g3
# parsing: time 30900
#time : 309000
# parsing: otim 30300
# parsing: usermove f8g7
# book move: BookMove [move=f1g2, frequency=225]
move f1g2
# parsing: time 31200
#time : 312000
# parsing: otim 30400
# parsing: usermove d7d6
# book move: BookMove [move=e2e4, frequency=24]
move e2e4
# parsing: time 31400
#time : 314000
# parsing: otim 30500
# parsing: usermove e7e5
# book move: BookMove [move=g1e2, frequency=5]
move g1e2
# parsing: time 31700
#time : 317000
# parsing: otim 30600
# parsing: usermove e8g8
# book move: BookMove [move=e1g1, frequency=12]
move e1g1
# parsing: time 32000
#time : 320000
# parsing: otim 30200
# parsing: usermove c8e6
# book move: BookMove [move=d2d3, frequency=7]
move d2d3
# parsing: time 32300
#time : 323000
# parsing: otim 30300
# parsing: usermove c7c6
# transposition table initialized with 1048576 entries.
# time remaining: 323000, increment: 3000, allotted time: 15920
1 -183 1 2 c3d5
1 -1 3 4 c3b1
1 4 4 6 c3a4
1 17 4 10 f1e1
1 20 4 12 h2h3
1 22 4 14 h2h4
1 22 6 39 h2h4
2 7 6 78 h2h4 b8d7
2 12 12 230 d1b3 b7b5
2 12 12 246 d1b3 b7b5
3 17 21 368 d1b3 b7b5 h2h4
3 17 28 1500 d1b3 b7b5 h2h4
4 7 45 3541 d1b3 d8c7 h2h4 b8d7
4 7 79 5825 d1b3 d8c7 h2h4 b8d7
5 12 121 9522 d1b3 d8c7 h2h4 b8d7 a2a4
5 12 139 15133 d1b3 d8c7 h2h4 b8d7 a2a4
6 7 190 23677 d1b3 d8c7 h2h4 b8d7 a2a4 d7c5
6 9 293 38345 h2h4 b8d7 a2a4 a7a6 f2f4 h7h5
6 9 339 64469 h2h4 b8d7 a2a4 a7a6 f2f4 h7h5
7 10 440 97805 h2h4 b8d7 a2a4 a7a5 b2b3 d7c5 f2f4
7 10 640 172694 h2h4 b8d7 a2a4 a7a5 b2b3 d7c5 f2f4
8 7 817 243868 h2h4 b8d7 a2a4 a7a5 f2f4 d7c5 f4e5 d6e5
# hash probes: 628514
# hash hits: 58960 (9.38%)
# hash collisions: 31636 (5.03%)
# fail highs: 32795 (5.22%)
# fail lows: 2422 (0.39%)
# exact scores: 37 (0.01%)
move h2h4


# parsing: result 1-0 {Pepo2424 resigns}

This improvement was a lot of fun to implement and it’s a lot of fun to watch. chess4j’s online opponents seem to like it too:

Ara61 says: Thank you for the great game!

I’ve also made some great improvements to the engine’s evaluation routine, but that will be the subject of another post very soon! And, as always the latest development code is available from the project website. These changes are not included in the last official “release” but will be in the 3.0 release coming within the next few weeks.

Posted in chess4j, Computer Chess | Comments Off on chess4j + SQLite

Another Goodbye

On Feb. 2 our family was dealt more bad news as Amy’s grandmother, Sallye Anderson passed away at age 88. It wasn’t totally unexpected, but it was certainly tough.

For many years our family has spent Sundays by going to church, and then going out to lunch with the entire family. After lunch we would all gather at Mr. and Mrs. Anderson’s house and spend the entire afternoon there, leaving just in time to get the kids in bed for school the next day. Sundays just won’t be the same.

I will never forget how she would greet me every single time I saw her. She would give a big smile and say “hey son!” I will sure miss that.

Mrs. Anderson’s obituary is here.


Goodbye Mrs. Anderson, for now. We love you and miss you.

Posted in Life Updates | Comments Off on Another Goodbye