6 votes

What programming/technical projects have you been working on?

This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

3 comments

  1. [2]
    DataWraith
    Link
    I've given up on my Ultimate Tic Tac Toe AI project. The second iteration of neural networks was much better than the first, but they still get soundly beaten by a parallel Monte Carlo Tree Search...

    I've given up on my Ultimate Tic Tac Toe AI project.

    The second iteration of neural networks was much better than the first, but they still get soundly beaten by a parallel Monte Carlo Tree Search when given equal time for move selection. The NNs aren't useless -- they need about 100x fewer rollouts to achieve the same strength as MCTS, but since the MCTS does at least 100x more rollouts per unit of time, the NNs don't seem worth the trouble if the goal is a strong AI.

    It would probably be possible to throw a lot of engineering effort at it, try to batch evaluations better to properly utilize the GPU (which sits at 10% utilization during my naive Unbounded Best-First Minimax search), but I think at that point one would abandon the simplicity of UBFM search, which means you could just as well use MCTS because that is much easier to parallelize.
    Maybe UBFM only really shines for more complicated games such as Hex, or maybe I haven't selected the proper architecture and hyper-parameters, or maybe I was too impatient and would have needed to train the NNs for (much) longer.

    Either way, it was a fun project, and I learned a lot, even though I did not succeed.

    4 votes
    1. streblo
      Link Parent
      Knowing when to move on is an important skill! I was looking a while ago at MCTS for writing a Magic: The Gathering engine. It's been done before but only on for a very simplistic version of MTG....

      Knowing when to move on is an important skill!

      I was looking a while ago at MCTS for writing a Magic: The Gathering engine. It's been done before but only on for a very simplistic version of MTG. I doubt it would have been very good, the branching factor is insane when you try and account for imperfect information. Maybe I should have looked at NNs -- not that I got anywhere close to writing AI.

      First I needed a more complete engine like Forge or XMage. The problem is that those are terrible messes of code spaghetti where each card is hand programmed. So then I backed up even further and started writing a parser for MTG cards which has also been tried before several times without success. I figured once I had a parser written the game logic would just be the relatively straightforward task of implementing this tiny spec. The further I got the more I realized just how many hundreds of edge cases there are even in newer cards. I'm actually unsure how they do it for the Magic: Arena client which I know uses some sort of tokenizing parser or NLP.

      Anyways then my interest in MTG started to wane a bit and I shelved the project for other things. :P

      4 votes
  2. DMBuce
    Link
    I wrote a couple of scripts for i3blocks. Here's them in action in my i3 bar. Weather + Monitoring: https://i.imgur.com/owUdUGY.png Compact view: https://i.imgur.com/aUu5FnA.png One script is a...

    I wrote a couple of scripts for i3blocks. Here's them in action in my i3 bar.

    Weather + Monitoring: https://i.imgur.com/owUdUGY.png

    Compact view: https://i.imgur.com/aUu5FnA.png

    One script is a simple single-system monitoring script that gathers monitoring info and shows an aggregate in my i3 bar. It works by parsing monitoring info in CheckMK's local check format. There's one directory where various processes (cron jobs and such) can drop off check files in that format, and another directory that contains check scripts that output in that format when you run them. So the monitoring script just runs each check script, parses their output, parses the check files, then outputs aggregate data marked up in pango for i3blocks. So far I only have a check script for monitoring filesystem usage, and I have my backups set up to drop check files off for monitoring the number and integrity of my backups.

    The other i3blocks script I wrote uses wttr.in to show the weather during the day and the phase of the moon at night. It determines whether it's daytime or nighttime with the help of a redshift hook, but falls back to using the time of day if redshift or the hook isn't installed or isn't working.

    3 votes