Showing posts with label Game. Show all posts
Showing posts with label Game. Show all posts

Saturday, January 14, 2017

The long road to Go

Some people fill their dead time with shoot-'em-ups on their phones or tablets.

Boring.

I'm not interested in chess, but the game of Go has vaguely intrigued me. A brief search led me to the British Go Association and their recommended starter Android app, 'GOdroid'.


GOdroid screen shots

This app is for complete beginners, played on a 9x9 board on my Nexus 10.
I lost the first game.

I lost the second game more comprehensively.
OK, so this is not as easy as it appears. Time for some assistance. I turn to Amazon.

Amazon link

The book arrived this morning and looks promising.

---

No jokes please. I just wrote a post about building an AI system to play noughts and crosses. I am not planning to take on AlphaGo!

Friday, September 04, 2015

Clare vs. 'the Cat'

This afternoon I programmed my very first simulation of the family pet, Shadow. In this simplistic iteration, the cat plays a game with the user. The idea is to stack 20 cans of cat food. The user and the cat take turns to stack 1, 2 or three cans at a time: the first to 20 wins.

Here is a transcript of the start of play. The cat's moves are between asterisks ***; the user's moves are signposted with -->.

Miaow, my name is Shadow. The game is to stack 20 cans of cat food. You can choose 1 or 2 or 3 cans at each turn. Me too! First to 20 wins.

Do you want to play first? type y for yes, n for no followed by return.

So, do you want to play first (y/n and press return)? n

*** My move is 2 cans. Total number of cans = 2 ***

enter your number 1, 2 or 3 |: 2

--> You entered 2 cans. Total number of cans = 4

*** My move is 1 cans. Total number of cans = 5 ***

enter your number - 1, 2 or 3: |:  ...

And here is a video of my guinea pig, Clare, playing the cat. What was it that Kipling said about winning and losing? (You may have to double-click on video to get full screen).



The game was an exercise from 'The Art of Prolog' and it took me a while to develop the game-play to program. Here is the folder containing the Prolog program by the way: you may use it to infer the winning strategy.