š¾ Archived View for gemini.rawles.net āŗ blog āŗ 2020 āŗ 06 āŗ 08 captured on 2021-12-03 at 14:04:38. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
(updated 2020-06-08)
It's a bit of a long one this week. I think I've just had a lot of coffee!
GO. I had my second 13Ć13 go gameā½įµā¾ over the course of the last week. Like no other game I've played, go has this property of unfolding itself to you as you play, and each game is an education. Compared to my first 13Ć13 gameā½įµā¾, the main lessons ā whether from mistakes or from successes ā were:
(a) online-go.com ā via https
(b) online-go.com ā via https
I am improving at reading ahead, especially when using the analyserā½įµā¾. Doing so seems to reveal small patterns and move sequences that act as little lessons. Chrisā½įµā¾ is open to undoing moves if we would learn something from the undoing, and we've now rewound and started playing a fork of the second gameā½į¶ā¾ from a critical point.
(a) forums.online-go.com ā via https
(b) online-go.com ā via https
(c) online-go.com ā via https
Given these lessons, the next goal for me is to learn a few of the basic eye shapesā½įµā¾. There are a few hundred strong eye shapesā½įµā¾, but at my level, apparently, the basic five will make a big difference.
(a) senseis.xmp.net ā via https
(b) senseis.xmp.net ā via https
I've also tried to get my nephew into go by introducing him to atari goā½įµā¾ via the Goban app on my computerā½įµā¾. He internalised and applied the basic rules within minutes, doing well in a game or two of atari go on a 7Ć7 board, but after I called it 'THE board game' (a paraphrasing of BoardSpace's opinionā½į¶ā¾), he declared it 'THE worst board game... with pebblesā½įµā¾'. I still have a bit of work to get him into itā½įµā¾. I have ordered an simple go set from Hoyle'sā½į¶ ā¾, since I think maybe it'll be more enjoyable to play away from the computer. We'll see ā I won't give up!
(a) senseis.xmp.net ā via https
(c) boardspace.net ā via http
(d) senseis.xmp.net ā via https
(e) senseis.xmp.net ā via https
(f) hoylesoxford.com ā via https
HASKELL. My simple GPS trails app is plodding along. I'm not really adding much in the way of features, more that I'm trying to prune and tweak the code ā AST topiary ā to make it more concise and functional. As an erstwhile Prolog guyā½įµā¾, I'm used to recursionā½įµā¾, but converting things to foldsā½į¶ā¾ where possible really made things look nice.
(a) cis.upenn.edu ā via https
(b) en.wikibooks.org ā via https
(c) learnyouahaskell.com ā via http
I wanted to go somewhere else with my Haskell, though, and on Sunday afternoon I started experimenting with algebra in Haskell. I'd enjoyed learning about structures like monoidsā½įµā¾, and I wanted to see how some other algebraic structures could be defined and implemented.
(a) learnyouahaskell.com ā via http
The Haskell Prelude is a moduleā½įµā¾ which contains the basic, standard definitions. They are seen by many as not ideal for working with abstract structures. It's imported by default, but fortunately you can disable thatā½įµā¾ and use your own Prelude ā your own custom Preludeā½į¶ā¾ to suit your application and your philosophy on the structure of types within it. Numeric Preludeā½įµā¾ provided a re-orientation toward abstract structures, in the words of its package description, 'an experimental alternative hierarchy of numeric type classesā½įµā¾'. Algebraic Preludeā½į¶ ā¾ is another drop-in replacement for Prelude based based on the algebraic hierarchy provided by the `algebra` packageā½įµā¾ for constructive abstract algebra.
(a) hackage.haskell.org ā via https
(b) wiki.haskell.org ā via https
(c) stephendiehl.com ā via https
(d) wiki.haskell.org ā via https
(e) hackage.haskell.org ā via https
(f) hackage.haskell.org ā via https
(g) hackage.haskell.org ā via https
More generally, Haskell is sometimes recommended for mathematical work, or at least for mathematiciansā½įµā¾, even though purpose-built languages like Macaulay2ā½įµā¾ are out there. And functional programming is most often connected with logic ā not least because of the Curry-Howard isomorphismā½į¶ā¾ ā and category theoryā½įµā¾, but I'm more talking about using Haskell to explore mathematics, rather than using mathematics to understand Haskell. So it's time for another project.
(a) blog.sigfpe.com ā via http
(b) faculty.math.illinois.edu ā via https
(c) en.wikipedia.org ā via https
(d) en.wikibooks.org ā via https
MACHINE LEARNING. I think I should start with something simple and familiar, so I'm going to try to code up, in a general way, a version space learnerā½įµā¾, a concept learner. It's a binary classifier, that is, a learner that decides whether an instance is to be labelled as one thing or the other. This kind of learning was the first topicā½įµā¾ in the first textbook we studied in my machine learning MSc course twenty years ago! It's summarised well in the slides for that chapterā½į¶ā¾.
(a) en.wikipedia.org ā via https
So, a quick overview of the ideas:
(a) en.wikipedia.org ā via https
(a) en.wikipedia.org ā via https
(a) people.cs.bris.ac.uk ā via http
The logical language in the most basic implementation of all this would be just propositionalā½įµā¾. That is, the examples are just yes/no values describing aspects of the weather (sunny? rainy? snowing?). However, you could use any suitable logical language, as long as you could decide generality between the descriptions. Inductive logic programmingā½įµā¾, one of the focuses of my PhD thesisā½į¶ā¾, commonly uses first-order Horn clausesā½įµā¾ instead.
(a) en.wikipedia.org ā via https
(b) en.wikipedia.org ā via https
(c) pub.rawles.net ā via https
(d) en.wikipedia.org ā via https
Learning in this way isn't exactly popular, and one reason for that is that version space learning doesn't handle noiseā½įµā¾. It fits the data perfectly, and that means encountering any two examples which are inconsistent just result in an empty version space. From there you can't really learn anything! Although this learning strategy has been generalised to noisy dataā½įµā¾, the setting I lay out above is far too limited to be useful for real-world learning. But, it's a start.
(a) en.wikipedia.org ā via https
So, coming back to my Haskell mini-project, I'm going to be basically playing with lattices or partially ordered setsā½įµā¾ at one level, and propositional and perhaps other logics at another. Lattices are modelled by the `Algebra.Lattice`ā½įµā¾ module inside Numeric Prelude, but, playing around a bit, it seems that the `Ord` classā½į¶ā¾ is the only way of representing an order, and it must be total. `algebra` supports partial ordersā½įµā¾, but there's a purpose-built `lattices` packageā½įµā¾ which looks more fine-grainedā½į¶ ā¾ and useful for this application. I plan to try both `algebra` and `lattices`, just to get a feel for things. The basic mechanics of the logic can be handled by, for example, `logic-classes`ā½įµā¾, though I could just code up the propositional case myself. If I can keep the two layers separate I might be able to do some cool tricks.
(a) math.usm.edu ā via https
(b) hackage.haskell.org ā via https
(c) hackage.haskell.org ā via https
(d) hackage.haskell.org ā via https
(e) hackage.haskell.org ā via https
(g) hackage.haskell.org ā via https
And, as you'd expect, all this has been done already in `AI.VersionSpaces`ā½įµā¾, so none of this is remotely ground-breaking except for me. But I hope it'll serve as a familiar place from which to explore working with algebraic structures with Haskell, from which I can head out into less familiar territory.
(a) hackage.haskell.org ā via https
To support this interest in maths and logic with Haskell, I'm also going to try to read at least a couple of chapters of The Haskell Road to Logic, Maths and Programmingā½įµā¾ by Jan van Eijckā½įµā¾ and Kees Doets. In the preface it states:
(a) staff.fnwi.uva.nl ā via https
(b) staff.fnwi.uva.nl ā via https
The purpose of this book is to teach logic and mathematical reasoning in practice, and to connect logical reasoning with computer programming.
and later,
The subject of this book is the use of logic in practice, more in particular the use of logic in reasoning about programming tasks. Logic is not taught here as a mathematical discipline per se, but as an aid in the understanding and construction of proofs, and as a tool for reasoning about formal objects like numbers, lists, trees, formulas, and so on. As we go along, we will introduce the concepts and tools that form the set-theoretic basis of mathematics, and demonstrate the role of these concepts and tools in implementations. These implementations can be thought of as REPRESENTATIONS of the mathematical concepts.
This sounds ideal.
BEEKEEPING. I've been looking after my nephew on some of the afternoons this week, too. We've slowly been working our way through building a Bees on a Budgetā½įµā¾ hive for the next swarm. It may require only a basic level of carpentry to assemble one of these, but it's good practice for both me and him.
(a) thorne.co.uk ā via https
We hope it'll be put in the apiary early this week, or later this week if we opt to stain it.
SCREEN TIME. The pandemic lockdown is still mostly in force in England, and is even stricter in the other countries of the United Kingdom. Since its sixth day, a few friends (initially me, Hollyā½įµā¾ and Redā½įµā¾) have been holding a virtual cinemaā½į¶ā¾.
(a) soundcloud.com ā via https
(b) someplacenice.co.uk ā via https
(c) rawles.org.uk ā via https
Using streaming services synchronised by a countdown, we'll watch one or two films a week, with a beer or wine in one hand and in the other, a device connected to our chatroom. The films have so far formed thematic triples (or quadruples): folk horrorā½įµā¾, neon noir, gems of the Hollywood left, or Lynchā½įµā¾.
So far we've watched a dozen films, but by far the favourites have been those by Ari Asterā½įµā¾. We are all fans of horror, and for us, these were absolute cinematic nightmares. So far Aster has made two feature-length films, Hereditaryā½įµā¾ (2018) and Midsommarā½į¶ā¾ (2019). Both are beautifully paced, shot and performed. Neither gives away everything on the first viewing, but enough to creep you out, so you won't necessarily want to watch either again right away!
(b) a24films.com ā via https
(c) a24films.com ā via https
When the lockdown began, we half-joked that we'd like to put on a folk horror film festival in an old creepy country pub somewhere in the middle of nowhere. I hope we do that.
(I updated some of the explanations in this note thanks to some feedback from Tim ā thanks, Tim!)
ā£
You are here: