Saturday 29 January 2022

Humiliation

I like playing Scrabble-like games and for a time I used to play on my Samsung phone using an app called WORD. However, there an annoying two minute lapse between my making a move and the app responding. There were also intrusive advertisements and in the end I stopped playing. Having recently acquired an iPhone, I downloaded an app called WORD MASTER that responds instantly once a make a play and there are only small, unobtrusive ads at the top of the screen. There are four levels: easy, medium, hard and master.

I set the play level to master and won three games before losing one. I felt good. The problem with playing on the phone is that the battery drains because I like to ponder long and hard over the best possible move. That set me thinking about playing on my always plugged-in laptop using just a web browser. I came across a Scrabble-like game called WORD SCRAMBLE with an interface as shown in Figure 1.


Figure 1

There are five levels: one to five. I confidently set the level to 5 and began playing. Never have a suffered a more crushing defeat. The computer achieved a score of over 600 while I barely made it over 200. I adjusted the level to 4 the next time but was similarly crushed, although not quite as cruelly. See Figure 2.


Figure 2

As an exercise in diminishing the size of one's ego, this is one of the best. I think the Scrabble apps on the Google Play store and Apple's App store are careful not to crush their human opponents too devastatingly or else people would avoid using them. I'm sure an algorithm kicks in when the computer takes too much of a lead so that subsequent moves are less than optimal and the human has a chance to catch up. There are no such algorithms at work in this online game. 

Reluctantly, I set the level to 1 and this time I reigned supreme, scoring 575 against the computer's measly 231. I guess I can try level 2 next and see how I fare. What really turned the game around was the massive boost I received by using DJINN as shown in Figure 3. This close proximity of TW, TL and DW is quite different to traditional Scrabble.


Figure 3

Notice how the 15 x 15 game board in Figure 1 is different to the traditional 15 x 15 Scrabble board. See Figure 4.


Figure 4: Vintage 1948 Scrabble Board

An interesting twist on the game is explained in the following article:
New AI Scrabble mod only allows words that don’t exist

A festive game of Scrabble is a time-tested method of surviving the extended company of obnoxious family members. But losing to a crabby relative can make their company even worse.

But this year, uncle Nigel (name changed to protect identity) will face a different challenge. Thanks to a new AI version of the classic board game, his distressing knowledge of the dictionary will be of no use at all — because real words no longer count.

The BLABRECS system is the brainchild of Max Kreminski, an AI researcher and game designer. He describes his creation as “like Scrabble but worse.”

The browser-based tool is designed to run alongside a regular Scrabble game. But under the new rules, you can only play words that the AI says don’t exist — but sound as if they could.

The system checks whether a word is meaningless by running it through a Markov model trained on the ENABLE list of more than 173,000 words, which is used as a reference dictionary for numerous word games.

“It looks at the statistical patterns of letter sequences in English words and uses this information to determine how likely a sequence of letters is to be a real English word,” Kreminski explains on the BLABRECS website. “Then it rejects both real dictionary words and fake words that it deems insufficiently plausible.”

Kreminski admits that the AI sometimes accepts real words as gobbledeegook, particularly inflected forms of base words and proper nouns that Scrabble generally prohibits.

When this happens, he suggests playing by the spirit of BLABRECS — whatever that means to you:

Is the game primarily about exploring the vast ‘shadow English’ implied by the statistical distribution of letter sequences, or is it about the inherent absurdity of an external authority presuming to dictate your language to you? Either interpretation seems valid to me.

Kreminiski is also considering adding AI opponents to future versions of the system, so you wouldn’t have to interact with toxic relatives at all. Roll on Christmas 2021.

This has particular appeal to me because, while lying in bed before sleeping, I often try to think of monosyllabic rhyming words that begin with the progressive letters of the alphabet. For example, words that rhyme with "ake". I'd begin with "ache" and then progress to "bake" and "cake" before reaching "dake". A far as I know this isn't an English word but it sounds perfectly feasible and I've often thought about assigning a meaning to such a non-word. Figure 5 shows what the result of entering "dake" into BLABRECS.


Figure 5: https://mkremins.github.io/blabrecs/


The site suggests the following approach to making use of its features:
Get together your regular SCRABBLE supplies and pull up this page in a web browser. Then play SCRABBLE as normal, but before you play a word, use the "test a word..." box at the top of the page to check whether the AI will let you play it. Remember, you can only play words that the AI approves!

When you find a legal word to play, hit the "Play It" button to add this word to the lexicon. As you play, you can write in definitions for all the words you've invented in the "Meaning" textbox next to each word. The player who comes up with the best definition for a word can add half of that word's points to their SCRABBLE score at the end of the game.
What meaning might be assigned to "dake"? The Urban Dictionary comes to our aid here. The entry that gets the most up votes is as follows:
Dake 
Used to describe one interesting as hell dude.

A dake never fails, unless it's failing at failing.

A dake is always calm and collected and never loses his temper.

A dake encompasses the word "awesome", and succeeds in any venture that he takes on, overcomes any challenge in his way. 
Wow... did you see that guy? He would have been named dake, but his parents didn't want everyone to know how successful and dominating he was just by hearing it.
By ladyfalcon November 28, 2011

  The github site also explains the origin of the "word" BLABRECS:

Why is it called BLABRECS? 
I generated every possible permutation of the word SCRABBLE and asked an early version of the AI to sort them from least to most statistically likely. BRABLECS won out by a significant margin, beating not only the real word SCRABBLE but also my hand-designed previous title BESCRALB. Then I switched the L and the R because BLABRECS sounds better and I'm not about to let a computer tell me what to do.
On the subject of AI, the two most popular AIs for Scrabble are Maven and Quackle. To quote from Wikipedia:
Maven is a computer opponent for the game created by Brian Sheppard. The official Scrabble computer game in North America uses a version of Maven as its artificial intelligence and is published by Atari. Outside North America, the official Scrabble computer game is published by Ubisoft. Quackle is an open-source alternative to Maven of comparable strength, created by a five-person team led by Jason Katz-Brown. A Qt cross-platform version of Quackle is available on GitHub.
Figure 6 shows an example of a Scrabble game in progress using Quackle, an open-source program. The first few plays are JOKED 8D 50, followed by REV(O)TInG E5 94 and YEX# F4 56. The # means a word valid in games using the British-originated word list (CSW) only.


Figure 6

Saturday 15 January 2022

Time to Remember

I've was analysing Iron and Wine's song Walking Far From Home in a post on my Mystical Meanderings blog. I like the song a lot but its lengthy lyrics are difficult to remember even though the guitar chord accompaniment is quite simple. This is a problem that I have with a lot of songs that I like to play on guitar: I know the chords but only parts of the lyrics. How to remember all the lyrics?

I've written about memorisation before in blog posts titled Remembering PIN Numbers on April 19th 2016. However, I've written more in a notebook on OneNote and I'll reproduce some of it here. For remembering numbers, the pinfruit system is popular. See Figure 1.


Figure 1

An extension of this idea involves grouping numbers into pairs from 00 to 99. See Figure 2 that I've copied from a Google Sheet.


Figure 2

An an example, my current telephone number is 081384755018 which can be broken up into the following pairs 08-13-84-75-50-18 which converts to sofa-thumb-fairy-shell-lace-tofu. This sequence of nouns needs to combined together into a meaningful image in which the elements are sequential. This only works once the table in Figure 1 has been thoroughly memorised.

When trying to remember the lyrics of a song however, another approach is needed. The images that arise from the lyrics need to be arranged sequentially in a sort of memory lane approach. I imagine myself strolling down a lane and the images that I encounter are one by one converted into the lyrics of the song. Below are the song lyrics that I've divided into quatrains because every four lines are more or less self-contained. There are twelve quatrains. The first and the last start with the lines:

I was walking far from home

Where the names were not burned along the wall

There are thus 12 x 4 + 1 = 49 lines with the last quatrain containing an additional line, namely "From the Lord". Quatrains 3 and 5 also begin with the line "I was walking far from home". There are also rhymes in lines 2 and 4 that also make memorisation easier. I've marked these in blue.


Walking Far From Home

Iron & Wine 
 

1 ************************** 


I was walking far from home

Where the names were not burned along the wall

Saw a building high as heaven

But the door was so small, door was so small 
 

2 **************************


I saw rainclouds, little babies

And a bridge that had tumbled to the ground

I saw sinners making music

And I dreamt of that sound, dreamt of that sound 
 

3 ************************** 


I was walking far from home

But I carried your letters all the while

I saw lovers in a window

Whisper, "Warn me like time, warn me like time"


4 ************************** 


I saw sickness blooming fruit trees

I saw blood and a bit of it was mine

I saw children in a river

But their lips were still dry, lips were still dry

 

5 ************************** 


I was walking far from home

And I found your face mingled in the crowd

Saw a boat full of believers

Sail off talking too loud, talking too loud

 

6 ************************** 


I saw sunlight on the water

Saw a bird fall like a hammer from the sky

And a woman on a speed train

She was closing her eyes, closing her eyes


7 ************************** 


I saw flowers on a hillside

And a millionaire pissing on the lawn

Saw a prisoner take a pistol

And say, "Join me in song, join me in song"


8 ************************** 


Saw a car crash in the country

Where the prayers are like weeds along the road

I saw strangers stealing kisses

Giving only their clothes, only their clothes


9 ************************** 


Saw a white dog chase its tail

And a pair of hearts carved into a stone

I saw kindness and an angel

Crying, "Take me back home, take me back home"


10 ************************** 


Saw a highway, saw an ocean

I saw widows in the temple to the Lord

Naked dancers in the city

How they spoke for us all, spoke for us all

 

11 ************************** 


I saw loaded linen tables

And a motherless colt and it was gone

I saw hungry brothers waiting

With a radio on, radio on


12 ************************** 


I was walking far from home

Where the names are not burned along the wall

Saw a wet road form a circle

And it came like a call, came like a call

From the Lord

 

Source: LyricFind

Songwriters: Samuel Ervin Beam

Walking Far From Home lyrics © Warner Chappell Music, Inc.

Tuesday 4 January 2022

The Usual Suspects


Figure 1: source

With the start of a new year, I usually try to kick start some projects that have languished over the previous year. One of those is my Indonesian language skills. Just as in Mathematics where I examine the number associated with my diurnal age, I thought I might be able to examine, on a daily basis, at least one Indonesian word or phrase that I was unfamiliar or uncertain about. 

It's also an opportunity to reconnect with my Indonesian language resources. One of these is my Indonesian-English dictionary (stored as a PDF file on my computer) which I'll make use of right now to investigate a word that cropped up in the local news. The word is "tersangka" and it's derived from "sangka" which is defined as follows:
Word: sangka

English Definition
menyangka­: suppose, think, expect. 
tersangka: 1 suspected. 2 expected. 
sangkaan: expectation, supposition, suspicion, idea.
Notes: Combinations/Idioms: 
si tersangka = the defendant in a legal case. 
tidak tersangka (or tak tersangka) = unexpected, unanticipated.

Examples
Orang yang besar itu tersangka pelakunya = That big person is suspected of being the perpetrator. 
Sangkaanmu tentang hal itu ternyata tidak benar = Your suspicion about that matter is apparently untrue.
Of course there are numerous online resources. Here are some of the results for tersangka:

  • bab.la defines it as suspect or expected and lists "yang tersangka" or "si tersangka" as "the suspect" with the latter being similar to "the defendant in a legal case" mentioned earlier. The example given of its use is:

    Dan tersangka pembunuhan telah terlacak melalui pakaiannya, pastinya di Inggris, di dalam suatu daerah yang cukup kecil sehingga Anda dapat mengirim anjing pelacak untuk mencari korbannya.

    And murder suspects have been tracked using their clothing, certainly in the U.K., to within an area that's small enough that you can send in tracker dogs to find the murder victim.
Figure 1 is pretty funny and the sign that the cat holds translates as "suspect in the clawing of a motorcycle seat" or "suspected of clawing a motor cycle seat". Photos like this help cement the meaning of a word into ones memory.