Monday, March 10, 2014

MetaLibrary version 8 for OpenTTD released

Quick on the heals of the release of version 7, version 8 of MetaLibrary has been released.

To recap, MetaLibrary is a collection of code I've written to simplify writing an AI for OpenTTD, a remake of my childhood favorite, Transport Tycoon.

Version 8 brings a 9-30x improvement in the speed of Lakes, and by extension, a speed-up in the Ship Pathfinder. And that's all for now; I figured that would be enough. The documentation for MetaLibrary has also been updated.

Saturday, March 01, 2014

MetaLibrary version 7 for OpenTTD released

MetaLibrary moves forward again!

Building off my recent announcement that documentation is now live, I have completed a fairly major update to MetaLibrary.

To recap, MetaLibrary is a collection of code I've written to simplify writing an AI for OpenTTD, a remake of my childhood favorite, Transport Tycoon.

This update particularly focused on adding robustness to the Ship Pathfinder. To that end, I wrote Lakes as a replacement for Waterbody Check. Both serve the same purpose of determining if two tiles are within the same waterbody, i.e. if a ship could sail between the two tiles. What sets Lakes apart from its predecessor is Lakes maintains a 'memory' of the tiles it has already considered, therefore increasing the speed of subsequent requests. Subsequent requests on an already checked route run in the order of 4 ticks, or about half of a game day.

Lakes has already seen a ten-fold increase in speed, although it, at least for the first run, is slower than the old Waterbody Check. New versions of MetaLibrary will likely continue to see speed ups and tweaks to Lakes.

Other improvements include:
  • Ship Pathfinder now uses Lakes rather than WaterBodyCheck
  • Ship Pathfinder now makes sure every point is in the same waterbody before adding it to the path
  • WaterBodyCheck is now deprecated in favour of Lakes
  • Documentation for MetaLibrary is now online at Minchin.ca
  • Fix array creation bugs in Array.Create2D(), Array.Create3D()
  • Added Array.RemoveDuplicates(Array)
  • Added Array.ToAIList(Array)
  • Added Extras.MinDistance(TileID, TargetArray); can be used as a valuator
  • Split Constants from Extras (file only, function access remains the same)
  • Split Industry from Extras (file only, function access remains the same)
  • Split Station from Extras (file only, function access remains the same)
  • Bumped maximum Log `Debug_Level` to 8
  • Added separate Changelog file
  • Rename `Readme.txt` to `Readme.md`
  • Update requirement to Fibonacci Heap, v.3
  • Automated creation of tar files for upload to BaNaNaS
  • Automated translation for the Game Script verision
The forum thread for MetaLibrary dicsusion is on TT-Forums, the code for MetaLibrary is available on GitHub, the documentation for MetaLibrary is now online at Minchin.ca, and MetaLibrary can be downloaded from BaNaNaS (AI version, GS version) or the in-game downloader (recommended).

Wednesday, February 12, 2014

Birkenhead's of Backford

I have been continuing my research of the Bunbury line. For the 18th century and earlier, Burke's Peerage has proved incredibly useful. As Burke's is serves mainly for showing how someone inherited their title or lands, it tends to be patrilinial (meaning descent is calculated through men). However, the wives are often well noted, including the wife's father. Such is the link between the Bunbury's and the Birkenhead's.
v. Eleanor, b. in 1605, m. to Thomas, second son of Sir Henry Bunbury, of Stanney.
So this their marriage would fall about 60 years before the Bunbury family moved from England to Ireland. So I followed up Eleanor's ancestors and family, and added 100+ Birkenhead's to my family tree. The Birkenhead's go back to four more generations to Adam Birkenhead, of Huxley, who lived during the reigns of King Henry VII and King Henry VIII (Henry VII reigned from 1485-1509. Henry VIII reigned from 1509-1547.) There is a note in Burke's that Adam Birkenhead "deriv[ed] from John De Birkenhead, who flourished in the reign of Edward III." Edward III reigned from 1327 - 1377, so this would push the line back another 150 years or so, but I'll have to find the names in another place.

Interestingly enough, Eleanor's grandmother was Elizabeth Bunbury, tying back in to the Bunbury line.

Tuesday, February 04, 2014

The Transformation of Facebook

While much has been written about Facebook, this isn't about how Facebook as a website or a company has changed, but rather how my relationship with it has changed. I am particularly inspired to write this this morning after reading this article by Cassey Johnston in Ars Technica.

It sounds like Cassey got on Facebook a little before me. I remember the announcement that Facebook would accept anyone with a .edu email address. Seeing as only American schools could get .edu domains, this became another case of "only the Americans get cool tech toys" (a far too common problem when living in Canada). It was maybe a year later that Facebook opened up to "foreign" universities. This would have been about 2006. At first I ignored it - I felt like I could keep track of my friends well enough through email and MSN Messenger. I eventually joined because I got an invite from a friend (Isaac) who was otherwise MIA.

The first bit was fun. I'd become friends with someone on Facebook, sift through their friends list to find more people I knew, and invite them to be my 'friend.' Lather, Rinse, Repeat. I joined March 27, 2007, and become 'friends' with 14 people that first day. My Facebook friends were people I saw frequently in real life, or wished I did, and so I had no problem sharing my thoughts and photos of my activities with them. No, I didn't share my "deepest, darkest secrets", but the sort of things I'd share with a friend at a party - personal triumphs, reflections on life, half formed ideas, and the like. And I ended up at a number of cool parties that I was welcome to attend, but had not been personally invited to, because 'everyone will see it on Facebook.'

But then something changed. Part of it was Facebook, part of it was me. The biggest change on the Facebook side was the change from a sort of 'private club' to a publicly available repertoire tied to my name. I did what I could to keep my profile locked down and out of (Google) sight, but I no longer trusted Facebook really wanted to keep anything private I didn't want shared with the world, and Facebook was just waiting for me to mess up or ignore some change in policy to make everything on my profile visible to the world.

I wasn't worried about people finding me via Google, but rather those people (particularly potential employers) making a snap judgement based on a five-year-old photo taken out of context. And this wasn't a hypothetical concern because I'd done it. When trying to find a job, I'd be writing a cover letter and trying to determine whether to address "Jamie" as 'Mr.' or 'Mrs.' and so to Google I would go. In the first page of results would be their (public) Facebook profile which would have their profile picture (solving the 'Mr' or 'Mrs' questions), but also pictures of their wife and two kids, plus the high school they went to and the year they graduated, and sometimes pictures of their last holiday in Mexico. Creepy.

On my own side, I grew up a little and life changed. I started seriously dating, and then got engaged and then married. As our relationship progressed and we started spending more and more time together, my need for Facebook decreased. I was less interested in going to parties to meet people. Facebook was useless as a list of possible dates. And I didn't need Facebook to communicate with my date. And when engaged and first married, your interest in the outsider world drops considerably.

So, like many other users, Facebook does seem like either "a chore or a timesink," depending on the day. The biggest reason I keep it is because it's easier that trying to keep an email list for 400 up-to-date and makes communication relatively painless for me and my Facebook 'friends.' Things that I want to say and have permanence, I post elsewhere, like here on my blog, which is older than my Facebook profile.

Over time, how I've used Facebook has changed many times. Will it change again, and what will that mean? I'm not sure; only time will tell....

Saturday, February 01, 2014

MetaLibrary Documentation Live

Over the last four years, I've been working on an AI called WmDOT for OpenTTD, a remake of the classic Transport Tycoon, a beloved game from my childhood. To support WmDOT, I've built a library of support functions. Over the last three days, I have written up documentation for the included functions and the result can be seen live at my site at http://minchin.ca/openttd-metalibrary/ I'm excited to have it up. I hope it will help others make use of my library.

Metalibrary is currently at version 6.