Moves to Unique Game

The Ke Jie vs. AlphaGo games quickly reached a position that was not in the GoGoD game collection of almost 90,000 professional game records: Game 1 was unique at move 5, game 2 was unique at move 7. To me, this seemed very early, and @badukaire on Twitter got me to wonder: How soon does a pro game usually reach a position that’s different from any previously played game?

Number of moves to unique game

Time for some data: I ran SmartGo’s fuseki matching on the whole GoGoD game collection (excluding handicap games). In that data set, the highest probability for a move to become unique is at move 8; the median is between move 11 and 12; the average is about move 13. Games are unique by move 7 in about 16% of games; by move 5 in only about 4%.

So it’s somewhat unusual to diverge from standard play that early, but there’s more variety of play early in the game than I expected. Also, I’m sure that a lot of games will soon be copying those moves by AlphaGo and Ke Jie, and those opening moves will be unique no more.

SmartOthello with ‘Ads’

SmartOthello achieved two of my goals for the app: it helped me learn Swift, and it gave me a reboot of the user interface that will influence the next versions of my Go apps. However, due to licensing restrictions, I couldn’t experiment with business models. For the first year, MegaHouse (who owns the license to Othello) was only willing to accept a paid-up-front app. I priced it at $2.99 — same as SmartGo Player, which is selling well. It turns out that Othello apps are a crowded market to compete in, and sales have been disappointing.

Blog othello pro upgrade

After renegotiating that license, SmartOthello 2.0 is now free, with a $2.99 Pro Pack in-app purchase that:

  • unlocks stronger computer play,
  • enables download of the WTHOR games database,
  • enables opening analysis,
  • and removes ‘ads’.

As for ads, I don’t want to give over part of my app’s screen to something garish that I don’t control. I’ve decided to follow Marco Arment’s lead and just roll my own. Their main purpose is to give you an extra kick to invest in the app so you can enjoy the full experience as it was designed.

Some of the ads promote the Pro Pack. For example:

Blog ads play expert Blog ads remove ads

Some promote my own apps:

Blog ads go booksBlog ads smartgo kifu

Some promote apps that I personally enjoy and recommend, mostly by indie developers. If people tap on the ad and purchase those apps, the affiliate fee (still at 7%?) helps, but more importantly, it helps another indie.

Blog ads obscuraBlog ads draftsBlog ads pcalc

And a few are links to books on Amazon that I’ve enjoyed, again with an affiliate link.

Blog ads changer

I expect income from those affiliate links to be minimal, but if those ‘ads’ nudge you to upgrade to the full experience, they have fulfilled their purpose. And they’re reasonably stylish, they’re accessible and localizable, there’s no user tracking, and you can even swipe to the next/previous ad anytime.

It’s an experiment. I’ve tried to find the right balance between being obtrusive and being obnoxious; most likely, I have not made them obnoxious enough. SmartOthello will be my guinea pig before I make any changes to the business model of my paid Go apps, SmartGo Player ($2.99) and SmartGo Kifu ($19.99).

Search and URL Scheme

The newest versions of SmartGo Kifu and SmartGo for Macintosh both include the enhanced names dictionary by John Fairbairn (GoGoD), with mini-biographies of over 4,000 players: life, career, status, teacher, Go style, and notes. Just tap on the player name above the board to see the biography.

Blog takemiya bio 

Improved search

The names dictionary includes translations as well as alternate names, and these are now used to significantly improve searching for players. Just type in the search bar, and it will try to match any property containing that text.

You can use ! to negate, e.g. type ‘Kato !Masao’ to look for all the other players named Kato. Anything that looks like a four-digit year will be matched to the date property, and you can search for a range, so e.g. ‘1990-1994 Takemiya’ will search for games Takemiya played during those years.

For more precise searches, you can test for specific properties and conditions, and combine conditions using & (and) and | (or). For example, you can type ‘winner=Lee Sedol & result~~0.5’ to find half-point wins by Lee Sedol (spelled Yi Se-tol in the game collection).

Blog winner lee sedol 

URL scheme

This kind of search is powerful within the app, but you can now access it from other apps too, thanks to the smartgo:// URL scheme. For example, the following link will get you directly to Shusaku’s ear-reddening move:

smartgo://games?id=1846-09-11a#127

Or find all the games played between AlphaGo and Ke Jie:

smartgo://games?player==AlphaGo & player==Ke Jie

Or find cool kyu-level problems:

smartgo://problems?coolness=10 & difficulty<=1k

Recent games of Gu Li playing black against Lee Sedol:

black==Gu Li & white==Lee Sedol & date>=2012

Games that Takemiya won by resignation playing black against a 9 dan:

smartgo://games?black=Takemiya Masaki & result=B+R & rankw=9d

Games played in the Kisei or Honinbo tournaments:

smartgo://games?event~~Kisei | event~~Honinbo

Three-stone handicap games played in the ’90s:

smartgo://games?handicap=3 & date>=1990 & date<=1999

Single-digit kyu life and death problems:

smartgo://problems?difficulty<=1k & difficulty>=9k & genre~~life

Please let me know how you use this new feature, and what could make it more useful to you.

Properties and operators

Here’s the complete list of properties currently supported (SGF tag):

  • Player: player (PB/PW), black (PB), white (PW), winner (PB/PW/RE), loser (PB/PW/RE), rankb (BR), rankw (WR).
  • Game info: id (GN), date (DT), event (EV), round (RO), komi (KM), handicap (HA), oldhandicap (OH), result (RE), rules (RU), time (TM), source (SO), analysis (AN), user (US), comment (GC).
  • Problems: difficulty (DI), coolness (CO), genre (GE).
  • Special: favorite (FA), any (any game info property).

The following operators are supported (comparisons are not case sensitive):

  • == or = : Equal
  • != : Not equal
  • ^= : Starts with
  • ~~ : Contains
  • !~ : Does not contain
  • >= : At least
  • <= : At most

Game Center

SmartOthello as released mid-August:

Blog othello avatar

And here’s SmartOthello mid-October:

Blog othello no avatar

The layout of the app was designed with profile pictures in mind. These player avatars disappeared when iOS 10 was released: Game Center leaderboards show boring gray circles, GKPlayer.loadPhoto returns nil.

Some bug reports and a Technical Support Incident later, this appears to be Apple’s intended behavior, not just a glitch. This behavior is so wrong and unlike Game Center that I think Apple will eventually backtrack, but waiting and hoping is not an option: I could not leave SmartOthello in that broken state. The newest version adds the ability to set your own profile picture and uses CloudKit to share these between players.

Matchmaking with iMessage

At WWDC in June, Apple announced that the Game Center app was going away, but not to worry, the Game Center functions were all still going to be there. Player invites would be using the newly improved iMessage; no code change needed. (Sure.)

That may have been true for the simplest matchmaking scenarios, but not for SmartOthello. I’m allowing players to set their color preference to black, white, or neutral, and their opening preference to regular or random. To start a game, I thus need that information from both players. (If they both prefer the same color, color choice will be random; random opening will only be applied if both players agree.) This added negotiation step needed extra work in iOS 10.

Blog invitation accepted

Starting a game over iMessage is cumbersome, adding several extra taps to specify opponent and start the game, as well as context switches. Apple has work left to do there. In particular, there needs to be a way to bypass the confusing auto-match screen.

Why no profile pictures?

My guess is that the missing profile pictures are related to using iMessage for matchmaking. Many iMessage users have images associated with them, but those are through the user’s contacts. There’s no way to map Game Center players to contacts, and for privacy reasons, it’s obvious that Apple won’t make those images available through Game Center.

It would be easy for Apple to add back a profile picture in Settings > Game Center. However, when starting a match through iMessage, that opponent would then have two images: one from Game Center and one from iMessage. It’s a mess, and that may be why the Game Center images were removed. Apple dug this hole for themselves; I hope they can dig their way back out.

Game Center in SmartGo

One of my goals with SmartOthello was to learn Swift (which worked out perfectly) as well as gain experience with technologies like Game Center and iCloud before including them in SmartGo. My experience with Game Center has not been good (poor and outdated documentation, APIs not working as advertised, no way to avoid polling for invites), and Apple doesn’t seem to be paying a lot of attention to the future of Game Center. Removing the avatars was a poor decision, and matchmaking using iMessage needs a lot of work.

At least I know to steer clear of Game Center for SmartGo.

SmartOthello

My Othello app is now available in the App Store — check it out at smartothello.com. Even if you’re not interested in Othello/Reversi, it will give you an idea of the future direction of my Go apps. And next time you play Go and somebody asks whether that’s Othello, at least now you have an app you can recommend.

SmartOthello is 100% Swift: it was a perfect way to learn Swift while building up code I can reuse for my Go apps. It’s also my first app to support Game Center, including achievements and leaderboards. My experience with Swift has been really good; my experience with Game Center less so.

SmartOthello is also a reboot in terms of user interface. The clean design that Scott Jensen came up with for Othello will definitely influence the Swift version of SmartGo. For example, the games list sliding in from the left leaves more room for the board on the iPad; the ability to turn off the status bar again provides more room and less distraction.

The tutorial in SmartGo Player uses Go Books under the hood, so the Swift version of Go Books is up next. Yes, this conversion is taking a while, but I’m planning to live with these apps for many more years. After launching my first Swift app, I’m more convinced than ever that the investment is worth it.

Go Congress 2016

I really enjoyed the Go Congress in Boston this year. Some observations:

    • Next year, I will bring a 9.7″ iPad. The 12.9″ iPad Pro just doesn’t fit well between Go boards at the tournament, so I ended up using my iPhone to record games. Luckily, there’s an app for that.
    • Brady Daniels makes a good case that you should come to the next Go Congress. And Kevin’s Go Talk about “What did you like most about the Go Congress?” clearly shows that people are a main feature, not just Go. Indeed, it was great to meet many old friends again, and meeting new ones in real life for the first time, in particular David Nolen, John Tromp, and Jonathan Hop.
    • I always get a lot of valuable feedback from SmartGo Kifu and Go Books users at the Congress, mostly positive, some feature requests. Here’s a happy SmartGo user from Kyoto: Go instructor Yasuko Imamura.

Yasuko Imamura

  • There were several interesting talks about AlphaGo (watch the Opening Keynote and AlphaGo Insider). It’s clear that AlphaGo is adding to and not taking away from Go. I’m really looking forward to the commented AlphaGo games the DeepMind team teased several times.
  • I just realized that I never made it to the vendor area in the basement. Future Congress organizers: please put the vendors where everybody sees them.
  • The 13×13 tournament is usually a fun warm-up for the main tournament, hope it will be back next year.

Looking forward to San Diego in 2017! See you all there.

Othello

That separate Swift project I hinted at in December? Time to announce what it is: an app for Othello (also known as Reversi).

Why Othello?

As a two-player board game, Othello is similar enough to Go that much of the Swift code for an Othello app can be reused for Go. But Othello apps are a dime a dozen in the App Store: who needs another one? Well, you do — you deserve better than the current crop of Othello apps.

Relevant experience

Most people associate me with only one game: Go. However, I do have a bit of history with Othello.

  • Computer Othello: My first Othello program played in a tournament in Santa Cruz in 1981, long before I first made it to the USA. My work on Othello got Prof. J. Nievergelt to introduce me to Go, and my Ph.D. thesis included a chapter on Othello (“Smart Game Board: a Workbench for Game-Playing Programs, with Go and Othello as Case Studies”).
  • Human Othello: I was Swiss Othello Champion in 1983, 84, 85, and 89, and United States Othello Champion in 1992. My tournament experience includes six Othello World Championships: Paris (1983 & 1988), Warsaw (1989), Stockholm (1990), New York (1991), and Barcelona (1992).

Unique combination

So yes, combining years of iPhone development, user interface experience from SmartGo, and expert knowledge of Othello, I do think I have something unique to bring to a crowded field of Othello apps.

I’ve been working on SmartOthello with designer Scott Jensen (@_scottjensen); it’s making good progress, and I have just started limited beta testing. I’m very excited about how it’s turning out, and what it means for the future of my Go apps.

More later. Meanwhile, you can sign up for news about SmartOthello at smartothello.com, and follow @smartOthello on Twitter or Facebook.

PS: I played in an Othello tournament in Los Angeles in March: 4 wins and 6 losses, definitely a bit rusty. At least I scored a 33-31 win against former World Champion Ben Seeley.