Week 27: One Final Experiment, or How To Train Your AI

What if this could be done without QR codes? This would be preferable, as a code takes up considerable space on a card, which is fine if it is on the back of a card but somewhat harder to accommodate on the front without obscuring text or illustrations for sighted users. What is instead image recognition was used – not to recognise the entire card, but to recognise a small strip which would be folded lengthwise down one edge of both sides of the card, and either then slid with the card itself into a card sleeve or simply stuck down if the player doesn’t mind permanently attaching something to their card?

This would provide two advantages: first, just as with the NFC tag, the card could now be identified from either the front or back of a card without ruining its aesthetics or obscuring its game text; and second, unlike both the QR and NFC solution, an entire hand of cards could now be identified simultaneously as long as the cards were held in the manner most players hold them: fanned out. I still believe it is important to be able to identify a card from the back, as holding a single card out far enough to scan with a phone is likely to reveal that card to sighted players, but there is definitely an advantage in being able to scan an entire hand, where aside from the top card, only the edge of the card is visible, minimizing the chances of revealing too much information to sighted opposition while gaining the ability to quickly check an entire hand without rescanning.


But how would this be achieved? Well, I’ve had some promising results (and fun!) with Clarifai which allows developers to take an image recognition algorithm and train it to recognise whatever image-related concepts they wish to define.


Princess Annette from Love Letter
The strip alone represents and identifies Princess Annette from Love Letter to the algorithm.

The algorithm is taught to disassociate the image on both front and back with the concept of Princess Annette and positively identify only the patterned strip. With twenty one positive examples and just five negative examples it was able to achieve a 100% success rate at identifying new images as the Princess or not the Princess.

The process by which the identifying strip was derived involved first creating a five character code based on the name of the game from which the card comes and the first three characters of the card name. This created the code LLPRI to be used as a unique identifier, but these letters could not be used without first being encoded in a form which would be easy for a computer to distinguish but more difficult for a human to remember. Inspired by the squares I had been using in my branding, I decided to assign a blue square to a dot and a brown square to a dash, facilitating the translation of the five character code into a system derived from International Morse Code. As an extra precaution to prevent cheating from sighted players, this five characters were then encrypted using the Alberti Cipher. This method was chosen in part because I am already familiar with this method of encryption and can’t justify spending time on learning more about cryptography at this stage of the project, but also because it is difficult to break by means of frequency analysis without the aid of a computer – meaning sighted opponents would not be able to deduce the codes through working out common letters first by virtue of them appearing often than uncommon letters (although using a code rather than a full word should also assist with thwarting such a technique). Potentially a user name (in this case my own user name from a social networking site) could be used as an encryption key, ensuring that one user’s set of codes to be printed for a specific game are different to those for another, once again reducing the risk of sighted players learning to cheat through recognising the patterns. However, the patterns are at this point in time potentially recognisable as they are quite large. The patterns should be as small as the recognition algorithm and camera permit to make them difficult to distinguish at distance.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s