Category: SmartGo

The Right iPad for SmartGo

I often get asked about getting an iPad for SmartGo Kifu and Go Books – which iPad should you get? Here are my recommendations.

iPadOS: My main recommendation is to make sure the iPad you get can run the current version of iOS (now iPadOS). Yes, SmartGo can also run on some older versions of iOS, but it’s no secret that I’m working on an all-new version of SmartGo, and that one will require iOS 13 when it’s released. (No ETA yet.) iPads are long-lived, so you want to future-proof your purchase: at https://en.wikipedia.org/wiki/IPad#History, you can see which iPads support the latest iPadOS.

Cost: Ten years ago, the original iPad started at $499. The newest iPad is now available for only $249 at Amazon ($329 from Apple). The iPad Pro is pricier, starting at $799. Note that Apple also has refurbished iPads.

Size: The regular 9.7″ iPad was a great size, and the newest version features a 10.2″ screen. The 10.5″ iPad Air and the 11″ iPad Pro give you more screen without adding much size or weight. The screen on the 12.9″ iPad Pro is magnificent, but it’s not quite as portable as the smaller ones. With the 7.9″ iPad mini you pay more to get a smaller screen; I’d only recommend that one if portability is paramount.

Storage: 32 GB is fine for SmartGo, no need to get more. There are many other reasons to get more storage, e.g. for photos and videos, or movies for long flights, but go games and books are small and won’t impact your storage. (Can’t recommend old iPads with 16 GB, as a significant part of that is used by the system.)

Speed: For SmartGo Kifu and Go Books, speed is not currently a major factor, but I hope to take more advantage of processing power in future versions. There are apps that are based on Leela Zero or KataGo that will use all the processing power that you can give them. If that’s important to you, look at the processor: the 2018 iPad Pro with an A12X will be fastest, followed by the 2019 iPad Air (A12) and the regular 2018 iPad (A10). Note that the iPad Pro is likely due for a refresh this year.

Accessories: No accessories are needed for SmartGo. But if you want the iPad to take over more of the functions of your PC, you may want to add a keyboard cover. The newest iPad supports the Smart Keyboard, but that one requires you to perform origami each time you set it up, while the keyboard on the iPad Pro is a snap to set up. All the newest iPads support the Pencil, but the Pencil for the iPad Pro attaches and charges magnetically, which makes using it much more convenient. So if these are important, I’d recommend an iPad Pro, as it’s a significant improvement, but the difference in price is also very significant.

Hope this helps you decide on the right iPad for you. The newest iPad at $249 is a steal, and will easily pay for itself thanks to Go Books.

Using Strong Go Programs on Macintosh

SmartGo for Mac is not playing strongly, as computer play is using my own pre-AlphaGo engine. However, like SmartGo for Windows, you can use GTP (Go Text Protocol) to connect to strong engines to play against.

The most recent version of SmartGo for Macintosh (0.8.18) includes some improvements in how it handles GTP engines. It’s not perfect, there’s much more to be done, but hopefully it will tide you over while I keep my focus on the new SmartGo for iOS.

The first step is downloading and installing the computer go engines you want to connect to. Here are three I’ve tested with SmartGo for Mac, from easy to hard to install. All assume that you’re somewhat comfortable using the Terminal app; check out this iMore guide if you’re new to the command line.

Pachi

The easiest way to install Pachi on the Mac is using Homebrew (which you probably have to install first). Follow these instructions:

https://brewinstall.org/Install-pachi-on-Mac-with-Brew/

Leela Zero

Find Leela Zero on Github, scroll down to I just want to play with Leela Zero right now, and follow the Homebrew instructions. You’ll also have to download a file with network weights; the link is in that same section.

KataGo

Installing KataGo is more complicated, as you have to compile it yourself. Follow the instructions for Linux at https://github.com/lightvector/KataGo.

smartgo-mac-gtp-preferences

Setting Parameters

Once you’ve installed an engine, you need to add it to SmartGo. Choose SmartGo > Preferences in the menu and click on GTP. Then click on the + icon and navigate to the executable of the engine you want to add. SmartGo uses the engine name to guess reasonable parameters, then tries to run the engine to get its name and version. If you see a green checkmark with the name and version, you’re all set. Otherwise, edit the parameters sent to the GTP engine (the third column in the table). The following basic settings work for my setup:

Leela Zero: -g –playouts 1000 –noponder -w /usr/local/Cellar/leela-zero/0.17/best-network/40b_257a_64k_q

KataGo: gtp -model /Users/anders/work/katago/cpp/models/model.txt.gz -config /Users/anders/work/katago/cpp/configs/gtp_example.cfg

Leela Zero and KataGo take a while to initialize, so even just getting name and version initially can take a minute, and SmartGo may time out. If it does, just try starting a game against the engine anyway (File > New Game, specify the engine in the dropdown for Black or White), and see if it works.

I hope these instructions get you pointed in the right direction. I’m sorry none of this is as easy as it should be.

WWDC 2019

I’ve been experiencing WWDC from home, watching videos, reading documentation, and experimenting with the new APIs. The changes introduced this year are very exciting – Apple is firing on all cylinders. Here are my main takeaways.

Mac Pro

My iMac is 4.5 years old, and I’m looking for a replacement I can keep for many years and expand as needed. The new Mac Pro is perfect. Except for price. Once available, I’ll have to evaluate whether a Mac Pro makes sense, or whether an iMac Pro (now looking much cheaper!) will work just as well for development.

The Pro Display XDR is gorgeous, but way overkill for what I need. I think chances are that the iMac is due for a design refresh soon, and at that point, I would expect Apple to release matching standalone monitors. While hoping and waiting for that, I can get a second Dell P2415Q 24” monitor (just $353 instead of $6000) to tide me over if I go with the Mac Pro.

UIKit on Mac

With Catalyst (a.k.a. Marzipan), Apple allows iPad apps to run on the Mac. I’ve already used it to run my new work-in-progress iOS SmartGo app on the Mac, and so far it looks like a good path forward. I hope to end up with a Mac version of SmartGo that is more capable and more complete than the current one, and that will be easy to keep up-to-date with the iOS version.

SwiftUI

SwiftUI was an amazing surprise, the culmination of years of work behind the scenes at Apple. It makes me very happy that I bet on Swift several years ago, first creating SmartOthello to learn Swift, and now rewriting SmartGo in Swift. I’ve been watching the SwiftUI videos and experimenting with it, and it’s a real game changer: with minimal code, it provides more of the features users expect, and a more native experience on the Mac, all while reducing errors, providing instant previews, and making development more fun. It’s win – win – win.

This WWDC really knocked it out of the park. I’m very excited – so much to learn. Thank you, Apple.

Go Congress 2018, Williamsburg

I enjoyed a fun week at the US Go Congress in Williamsburg, Virginia: a great success in terms of playing go, learning go, meeting old friends and making new ones; a mixed bag in terms of winning tournament games. I definitely did better with a longer time limit:

  • 3 – 3 in the main tournament. Time limit: 1h 30m per player.
  • 1 – 4 in the 55-and-over tournament (40 minutes per player).
  • 1 – 3 in the Die Hard tournament (30 minutes per player).

Clearly a better result than at the European Go Congress last year, where I lost the first seven games. No jet lag certainly helped. My rating before this tournament was 3.07, just barely 3 dan, might drop to 2 dan once the ratings are updated.

I talked to many SmartGo Kifu and Go Books users, and got to answer support questions in person. It’s really valuable to see where people stumble and what they don’t know about – I’ve written a separate blog post on that.

As previously announced, I’m in the process of rewriting SmartGo Kifu in Swift. I demoed a preview of the new version, and got good feedback on design and features. It won’t be ready until 2019 at the earliest, though.

Unfortunately, a family commitment will likely keep me from attending next year’s Go Congress in Madison, Wisconsin. I hope to be at the European Go Congress in Brussels instead.

Atomium

Unknown Kifu Features

It’s rewarding to see many go players at the Go Congress use SmartGo Kifu, and invaluable to be able to provide support in person. Most questions are due to users not being aware of existing features. I will keep improving the user interface to make features easier to find and use; meanwhile, here are answers to questions that came up several times during the week.

Edit Game Info

If you misspelled your opponent’s name, or started recording a game without entering the player names, tap on the title of the game above the board (with the little orange i) to see the game info, then tap on Edit to add or change any of the game info attributes.

Edit game info

Joseki Matching

Many players know about joseki matching, but may not be aware they can match a whole side of the board. To see a list of the games that match, tap on the little orange > in the joseki result (bottom left below the board).

Joseki matching

Rotate to Opponent’s View

If you get a game record from your opponent, it’s probably upside down. You can rotate a game in My Games by rotating two fingers around the center of the board. It rotates by 90 degrees only, so you have to rotate twice, and it’s a bit fiddly, but at least it’s possible. (This will be much improved in a future version, showing the following panel of rotation options.)

Rotation panel

Guess Next Move

Pick a game by a pro you like, turn on Guess Move, then try to figure out where the pro played. SmartGo Kifu gives you clues: right area but wrong move, right move but wrong timing, or the wrong area entirely. This also turns out to be great bar entertainment for several people, as we proved at the Green Leafe last night.

Guess next move

Edit Game Record

It’s easy for mistakes to sneak in when you use SmartGo Kifu to record a game. At move 100, you notice that you placed an opening move off by one. Or you record afterwards, from memory, and you forgot an exchange played outside the main flow of the game. How do you fix it?

Go to Move

To correct a move, you first need to get back to when that move was played. Tap and hold on a stone, then choose Go to Move.

Go to move

Adjust Move

When you’re at the move that’s in the wrong place, tap and hold on that stone until the feedback changes, then drag it to the right spot. Voilà.

Insert Move Pair

If you’ve forgotten a pair of moves, first go to the position where those moves should have been played. Then tap on the popup menu in the bottom left of the board, and tap on Edit. Tap on the Insert 2 icon, then play the two moves. Instead of creating a new variation, those moves will be inserted directly into the game.

Insert two moves

SmartGo Kifu also provides commands to delete a single move or a whole branch, if your game record needs more extensive surgery. The Macintosh and Windows versions of SmartGo provide additional features to help you fix any issues in your game records.

Double-Tap to Zoom

Such a simple feature: double-tap to zoom in on the Go board. On the iPhone, it conveniently zooms to use the full height available. So why does SmartGo Kifu have a setting to turn it off?

Double tap to zoom

When SmartGo detects a tap on the board, your intent is not clear: do you plan to play a move, or is there a second tap coming? On iOS you can tell the system to disambiguate between the two gestures – for the single-tap to succeed, the double-tap has to fail:

singleTapGesture.require(toFail: doubleTapGesture)

The price you pay is that move entry is delayed by a quarter of a second. Thus that setting gives you a choice: convenient zooming or faster move entry. Not a good choice. (But at least you now know how to speed up move entry.)

There’s a better way to solve this: always play the move right away. Then if it turns out to be the first tap in a double-tap, undo the move and zoom the board instead. Fast move entry and zoom, no setting needed. However, that means being able to cleanly undo the move (and anything else that a tap on the board might do), and in SmartGo Kifu, that would be harder to implement than what the feature is worth.

Rewriting SmartGo in Swift is still work in progress; a long journey. But thanks to less technical debt, I’m able to add features like undo, and thus make move input fast while still allowing you to double-tap. Getting rid of a confusing setting always makes me happy.