← Back to context

Comment by strstr

3 days ago

My suspicion is that the bot was a fairly standard chess bot, but the difficulties were set based on computation time. As airplane computers got better, it turned into a beast.

As a result, if you tried this on older planes, it might have been “easier”

One of my first paid iOS dev jobs was porting a Go game from iPad to iPhone, don't even think the 4 was out yet. It also used computation time based difficulties. By the time I was done writing it, I knew a few tricks I could eke a win out with on 19x19.

When the iPhone 5S came out, I tried it on a whim to check the UI scaling etc... the beginner difficulty on a 9x9 board deleted me. It was grabbing something like 64x more samples per go, the lowest difficulty on the 5S (instant responses) never lost a single game vs the highest difficulty 3GS (15 second turns)

iPhones had a lot of moments like that. Silly bullshit like "what if every pixel was a cell in a collection view" would go from "oh it can barely do 128" to "more responsive than that was, with 2 million" in a few gens.

  • One of the minor weird things about iOS development early on was just how fast the transition was from the simulator being dramatically faster than actual devices to the simulator being slower than devices. When I started out you’d get things working nicely in the simulator and then discover it’s an order of magnitude too slow on a phone. Just a few years later and my phone was faster than my laptop until thermal throttling kicked in.

Chess on M series Macs has the same issue. Even level 1 is easily 2000+ Elo because of the same thing.

  • Oh, this led me down a rabbit hole…

    I was maintainer of the Chess app from the early 2000s to about 2015. We first noticed in 2004 that level 1 (which was then "Computer thinks for 1 second per move) was getting stronger with each hardware generation (and in fact stronger than myself).

    So we introduced 3 new levels, with the Computer thinking 1, 2, or 3 moves ahead. This solved the problem of the engine getting stronger (though the jump from "3 moves ahead" to "1 second" got worse and worse).

    A few years after I had handed off the project, somebody decided to meddle with the level setting code (I was not privy to that decision). The time based levels were entirely replaced with depth based levels (which eliminates the strength inflation problem, but unfortunately was not accompanied by UI changes). But for some reason, parsing of the depth setting was broken as well, so the engine now always plays at depth 40 (stronger than ever).

    This should be an easy fix, if Apple gets around to make it (Chess was always a side project for the maintainers). I filed feedback report 21609379.

    It seems that somebody else had already discovered this and fixed it in a fork of the open source project: https://github.com/aglee/Chess/commit/dfb16b3f32e5a6633d2119...

  • I found a used copy of Warcraft 3 at the store about ten years after it came out, proudly brought it home, fired it up and didn’t recall the graphics being quite that awful, but the first time I tried to scroll the map sideways it shot to the far end because they didn’t build a timing loop onto the animation and I shut it down, disappointed.

    Unfortunately they never released a remastered version of it. They seem to have made some clone of it called “reforged” whatever the fuck that means.

    • Yeah, Reforged was received very poorly so they basically end of life'd the franchise.

      There is a thriving community with a couple different choices for servers to play on. So I'm sure there's a fix for your mouse speed issue.

      Check Twitch for people streaming it: https://www.twitch.tv/directory/category/warcraft-iii

      Grubby, one of the early esports stars, still streams it regularly and hosts his own for fun tournaments with other streamers.

      2 replies →

    • There are various hacks and tools for games (especially DOS games, but for W3 there may exist the same) which delayloop various calls to slow things down enough "to work".

      The Dolphin emulator has run into similar things; usually doing things "too fast" just gets you more FPS but sometimes it causes the game to go insane.

      1 reply →

    • This is pretty much the experience of trying to play any game from the '90s on modern hardware. It always requires a bit of tinkering and usually a patch from the modding community. Funniest one I've found is Fallout Tactics. The random encounter frequency is somehow tied to clock speed so you'll basically get hit with random encounters during map travel about once every half second.

      2 replies →

    • Sorry if this is a dumb question but did you patch it to the latest version? I don't know if the in-game updater still works but from memory you could download some sort of patch exe file and update it that way.

    • The original Wing Commander was like that. Playable on 286s/386s, then Pentiums and beyond showed up and it was unplayable. The game started in the "simulator" to show you the controls, and you'd get blown out of space in about 0.5 seconds.

      2 replies →

    • > they didn’t build a timing loop onto the animation

      Wow.

      1984 (!!!) IBM PC (DOS) port of the game Alley Cat had timings built it. They actually used the system clock if I remember correctly, so it would always run at the correct pace no matter how fast the computer. Last I checked it, decades later, it still ran at the correct speed!

      I guess some lessons don't get passed on?

    • There's an SC2 custom campaign that reimplements the wc3 campaign that is worth a look.

  • AFAIK the only reason Chess even ships at all anymore is as a burn utility. They'll set it to AI vs AI at max difficulty to stress the system and make sure the cooling/power management works.

    • Never heard that one (it may indeed be used that way, but if it were the only reason Apple would probably keep it in the Apple internal parts of their OS installs).

      It would also be of limited use, as the engine is purely CPU based; it is single threaded and does not even use SIMD AFAIK, let alone GPU features or the neural engines.

      1 reply →