Posts
Blog Other  

0.20.1 includes updated logic for “fairness calculations”. This has already been pushed for the server so this is in fact available in all versions when running with cloud simulation enabled.

This came about mainly because of my efforts to try and generate interesting game settings. My idea was to sort all the setting combinations by fairness, generate new ones based on them (via some minimal genetic algorithm), and then repeat until some good results fall out.

Early attempts

My first attempts did not work well. The game simulation works by playing a few turns using the normal AI, and then seeing what it thinks its chances of winning from the current position are. I defined “fairness” as: take the chance of winning of the best player and the chance of winning of the worst player, and then calculate the ratio of the two. Here are some of the types of games it generated at first:

  • Games with lots of players. Since nobody can win, it is perfectly fair.
  • Games with a win line that is too big to reach.
  • Games with a target score that is too big to reach.

Early fixes

I fixed some of it by doing some basic processing on settings before simulating. If the winline won’t fit, or there aren’t enough unique winlines to achieve the target score, I just reject it. Also, for now, I limited it to just two players.

The results were better, but basically just a more complex version of the above: games in which the AI did not manage to actually achieve a win in its simulations.

Refining the AI

One possible problem I identified was that the “chances of winning” calculation isn’t really about winning. It’s actually a kind of fuzzy number combining winning, and tying for first. In this case, tying for first is something I want to avoid. To fix this I parameterized the core AI engine, so the way it assigns a score to outcomes could be varied. There were initially two options:

  • Original AI: Winning scores 1, tying for first scores 0.5, everything else scores 0
  • “Win only” AI": Winning scores 1, everything else scores 0

This means I can now look for games that have a high fairness, and a reasonably high chance of actually winning a game.

First derived game mode

Final updated AI

Separate to my goals of generating interesting game modes, I also took this opportunity to actually improve the AI. For games with more than two players, the (normal) AI now takes into account relative positions. So, for example with three players the following outcomes all have unique scores:

  • Finishing first, with no ties.
  • Tying for first.
  • Finishing second, with no ties.
  • Tying for second.
  • Finishing third.

This hopefully stops the situation in which multiplayer games ends up with several of the AIs “giving up” since they’ve determined they can’t possibly finish first.

Saturday, April 4, 2020 Sat, Apr 4, 2020 04 Apr '20
Technical
Improved popup in 0.20.1
  • Added new board size/topology selection popup.
  • Fix saving game copies.
  • Updated AI to take in account relative scores.
  • Changed fairness calculation.
  • Improved popup rendering.
Saturday, April 4, 2020 Sat, Apr 4, 2020 04 Apr '20
Release notes

It’s become a running gag that many commercial apps include release notes that just something like “Bug fixes and improvements”. Often it will be because there are lots of minor fixes that are too small and numerous to list. But just as often, there will be lots of technical changes that while important for various reasons, have no user facing effect. This post will attempt to explain some of the changes.

Xamarin Forms

Tic-tac-toe Collection depends greatly on a library called Xamarin Forms. This version updates it from version 3.4 to 4.4. There aren’t any major features in use yet, but there are a bunch of performance and stability improvements nonetheless.

Xamarin Essentials

This is a new dependency, and is partly the reason for the new Android 5 requirement. The key feature this brings is detection of light/dark mode, but it is also now used for launching external sites (for example: rating an app on iOS < 10.3 or accessing any web page on an Android device with Chrome custom tab support).

AndroidX

Android has long provided Android Support Library as a way of accessing new features on older versions of Android. AndroidX is conceptually just the next version of this. In practice, the implementation is very different and getting support for it in Xamarin has taken a while.

Removals

Several libraries have been removed.

Iconize by Jeremy Marcus is a library for using icon fonts in Xamarin Forms. I’ve used icon fonts since the very beginning and this library was a huge part of that. Enough of the functionality is now included directly in Xamarin Forms that the library is no longer needed.

Xam.Plugin.Connectivity and Xam.Plugin.Settings by James Montemagno superseded by Xamarin Essentials.

CarouselView.FormsPlugin by Alexander Reyes. For a long time, this was the best carousel view for Xamarin Forms, but it there is finally a version provided directly.

Acr.UserDialogs by Allan Ritchie provides system dialogs. After including Rg.Plugins.Popup for providing popup functionality, I switched to using that for simpler dialogs too for better style consistency.

Others

There are handful of other libraries that have been updated just on the principle that staying up-to-date is better.

Wednesday, March 4, 2020 Wed, Mar 4, 2020 04 Mar '20
Technical
  • Added auto light/dark mode detection.
  • Made it so you can edit a player by tapping on the icon, not just the edit button.
  • Improved Gomoku and Drop Four rendering.
  • Reduce default zoom level for topology games.
  • Fixed the “rate app” link on iOS < 10.3.
  • Updated many libraries used by the app.

This version is not supported on Android 4.4 or earlier

Wednesday, March 4, 2020 Wed, Mar 4, 2020 04 Mar '20
Release notes

0.19.1 of Tic-tac-toe Collection drops support for landscape orientation on phones.

This has been difficult to support and made certain complicated screens (like the game setup screen) take much more effort for very little gain.

Tablets will still support landscape orientation, however there will no longer be a custom layout for landscape (on the few screens that did).

Tuesday, December 31, 2019 Tue, Dec 31, 2019 31 Dec '19
Announcements
Black theme on iOS in 0.19.1
  • Added support for manually selectable light, dark and black themes. Automatically changing theme based on device setting will come later. The black theme uses true black for backgrounds, the dark theme uses a dark grey.
  • Cleaned up styling and color of the app throughout.
  • Removed support for landscape orientation on phones.

This will be the last version available on Android 4.4 (KitKat) or earlier. Future versions will require Android 5.0 (Lollipop) or later

Tuesday, December 31, 2019 Tue, Dec 31, 2019 31 Dec '19
Release notes
Prime on iOS in 0.19

0.19 finally brings Prime support to iOS. This includes all the current features of Prime, including the removal of ads, unlimited campaign skips, two extra icons, and two extra colors.

If you’re interested in trying it as soon as possible, please join the beta on Testflight. Purchases made on Testflight versions will not actually charge you, but will also not be available outside of Testflight versions.

The Prime in-app purchase is now available to all iOS users.

Monday, November 25, 2019 Mon, Nov 25, 2019 25 Nov '19
Announcements
Prime on iOS in 0.19
  • Add in-app-purchase support to iOS, so Prime is now available.
Monday, November 25, 2019 Mon, Nov 25, 2019 25 Nov '19
Release notes
  • Fixed a crash issue that could occur on multiplayer setup game, depending on the state of the host.
  • Fixed a crash on iOS 13 when closing popups.
Thursday, October 24, 2019 Thu, Oct 24, 2019 24 Oct '19
Release notes

Preliminary release of topology options. Currently only available from custom game > advanced options. Also

  • Made hosting a multiplayer game more robust.
  • Game simulation is now triggered when a multiplayer game settings change remotely.
Tuesday, October 15, 2019 Tue, Oct 15, 2019 15 Oct '19
Release notes