-

Guildford to Farncombe

This is a very pleasant, level walk along the River Wey-Navigation – I think this is the third time I’ve walked it. It was a mainly sunny morning such that a north to south walk means walking into the low, Autumn sun, but it’s always nicer to walk away from a city rather than towards, so it’s a small negative. At this time of year the path along the river was inevitably strewn with puddles and muddy patches, but nothing much of concern.
At my destination, Farncombe, I once again had a small English Breakfast and a pot of tea in the friendly Natter café. Farncombe village is not much to shout about. A dozen or so shops close to the station with the nearest pub a third of a mile away.
My journey home was a sequence of mis-timing the first train, a broken down train and a poor connecting train, but with a novel to read it’s no big deal. A lovely day.

















No comments on Guildford to Farncombe -

Leatherhead to Westhumble

I’ve done this walk several times but this time I tried it in the reverse direction, thinking that a longer, gradual climb was better that a shorter, steeper climb. However, I think I prefer the usual way – ie from Westhumble to Leatherhead.
The Wild About Coffee café in the woods is a terrific stop-over but it’s only there Thursday-Sunday and between 9 and 3pm. It’s under the 3-mile marker on the map below.









-

Souleymane’s Story


A fine film dramatising what it’s like to be an asylum seeker in Paris illegally working as a fast-food delivery cyclist. Terrific performances particularly from Abou Sangaré as the asylum-seeker and Nina Meurisse as the government agent who will decide on his future. Highly recommended.
-

One Battle After Another


My son recommended this film. It’s long at around 160 minutes in which left-wing revolutionaries violently challenge a right-wing America. I messaged him afterwards:
“I didn’t think it was great but I didn’t think it was bad! It was very watchable because there was a lot going on. I guess it was too over-the-top for me – an all-action movie! I found it difficult to make out some of the dialogue, particularly at the beginning. In the small auditorium I was in, it was at times far too loud.”
For the first time ever in a cinema I was the only person watching the film. It was like watching a movie at home on a big screen but with no volume control.
Four days after seeing this film the cinema went bust, losing me my remaining four membership credits. Boo.

-

Polesden Lacey leaves







-

Sevens – another VBNET coding project

I was ready to do some more coding but I couldn’t think of a suitable project. Another game would have been ideal, to go alongside my other coding projects (cribbage, gin rummy, chess, backgammon, boxes).
I came up with the idea of coding the card game, sevens. It’s a simple game but I didn’t really think it would be much fun playing it against the computer. So I decided to code it as an exercise in testing various playing strategies rather than a game to be played. I was hoping to come up with four strategies for a four-player game and to see how they worked out with the computer playing all four hands. Unfortunately, the game is so simple I could only think of two strategies, a dumb one where the card choice is random, and an intelligent one. I could mix it up by getting the computer to play a mix of strategies, for example 1 dumb and 3 intelligent, or 2 dumb + 2 intelligent. So that’s what I did.
What did I discover?
Each trial was played over 100,000 games (taking 6 seconds on my laptop!)
- If 4 dummies played against each other, the dummies each won 25% of games
- If 4 smarties played against each other, the smarties each won 25% of games
- If 1 dummy played against 3 smarties, the dummy won 13% of games, the smarties each won 29% of games
- If 2 dummies played against 2 smarties, the dummies each won 13% of games, the smarties each won 37% of games
- If 3 dummies played against 1 smarty, the dummies each won 17% of games, the smarty won 49% of games
Conclusion?
Although sevens is a simple card game and there’s the luck of the draw influencing who wins, it’s clear that one’s chances of winning can be significantly improved by playing the cards well. So it’s not entirely a game of chance!
The code
There aren’t that many lines of code but as usual I had issues with the logic and with finding bugs. An interesting bug that took me a long time to find, was as a result of me using the wrong format for a piece of code. See below.
I had written the following piece of code:
The wrong code
Select Case card Case 1 - 6 direction = +1 Case 7 Return vbTrue Case Else direction = -1 End SelectThe objective was to take different actions depending on whether the variable ‘card’ had a value between 1 and 6, or a value of 7, or any other value (actually between 8 and 13).
The bug was that ‘Case 1 – 6’ does not capture the range of values 1 to 6, but instead captures only the value -5 (ie 1-6). The result was that values between 1 and 6 were handled by the wrong piece of code, the Case Else code. This was a hard to spot bug! The correct code is on the right.
The correct code
Select Case card Case 1 TO 6 direction = +1 Case 7 Return vbTrue Case Else direction = -1 End SelectThe code for the two strategies
Private Function PlayACard_strategy_1(player As Integer) As Boolean ' ' Strategy-1: Choose a RANDOM playable card for the current player to play and play it. ' Return true if card played otherwise false if no card able to be played ' Dim t As Integer nPlayableCards = 0 Call GetPlayableCards(player) If Testing Then Call PrintCards(player) If Testing Then Call PrintPlayableCards() If nPlayableCards = 0 Then Return vbFalse End If t = Math.Min(CInt((nPlayableCards * Rnd()) + 1), nPlayableCards) PlayerCards(PlayableCardsCard(t), PlayableCardsSuit(t), player) = vbFalse ' Change status to card played If Testing Then Debug.Print("Player " & Str(player) & " randomly plays " & Str(PlayableCardsCard(t))) Return vbTrue End Function Private Function PlayACard_strategy_2(player As Integer) As Boolean ' ' Strategy-2: Choose the BEST card for the current player to play and play it. ' Return true if card played otherwise false if no card able to be played ' Dim i, card, suit As Integer nPlayableCards = 0 Call GetPlayableCards(player) If Testing Then Call PrintCards(player) If Testing Then Call PrintPlayableCards() If nPlayableCards = 0 Then Return vbFalse End If For card = 1 To 7 ' Look for aces and kings, and if none then twos and queens, etc For suit = 1 To nSuits If PlayerCards(card, suit, player) Then ' If player has an ace (then up to 7) in this suit For i = 1 To nPlayableCards If PlayableCardsSuit(i) = suit And PlayableCardsCard(i) <= 7 Then ' if player has a playable card (7 or below) PlayerCards(PlayableCardsCard(i), suit, player) = vbFalse ' Yes. Mark card as played If Testing Then Debug.Print("Player " & Str(player) & " plays " & Str(PlayableCardsCard(i))) Return vbTrue End If Next End If If PlayerCards(nCardsSuit + 1 - card, suit, player) Then ' If player has a king (then down to 7) in this suit For i = 1 To nPlayableCards If PlayableCardsSuit(i) = suit And PlayableCardsCard(i) >= 7 Then ' if player has a playable card (7 or above) PlayerCards(PlayableCardsCard(i), suit, player) = vbFalse ' Yes. Mark card as played If Testing Then Debug.Print("Player " & Str(player) & " plays " & Str(PlayableCardsCard(i))) Return vbTrue End If Next End If Next Next MsgBox("We shouldn't ever get here!") Return vbTrue End Function -

Out the window – Diwali






-

Sutton United win!

-

Boppard, Germany

We didn’t go to Berlin this time but instead organised a trip to the Rhine valley to meet up with our Berlin-based son and his partner. The trip began with a flight from Heathrow to Frankfurt followed by a train to Boppard and to a fabulous AirBnb overlooking the Rhine. An evening meal at the Italian restaurant under our apartment was an enjoyable experience.
On the first of the two days based in Boppard we managed a boat excursion south along the Rhine to Sankt Goar where there’s the ruins of a castle. The day ended with some home cooking in the apartment.
On the second full day a train trip took us north to Cochem which was busy and not really worth a visit. After returning to Boppard three of us ventured out on what turned out to be a very risky hike into the hills which we aborted when the path became too treacherous to continue. The day ended with an obscenely huge restaurant meal.
The next day we left our apartment and caught a train north to Cologne and an overnight stay. A visit to the monstrously huge cathedral was well worth it. The day ended with a disappointing meal in an Italian restaurant which had suspiciously good reviews on TripAdvisor! The next morning we had a one-hour return flight from Cologne to Heathrow. In summary, we had a lovely short holiday with one half of the family.
Boppard – days 1-3


















Boat trip to St Goar (Sankt Goar) – day 2













Train to Cocham – day 3






Cologne – day 4





Boats on the Rhine







-

The Kingdom


A fine, French film following a Corsican gang as they engage in revenge killings. Seen from the perspective of the 15-year-old daughter of the gang boss, it’s a slow moving and absorbing movie.
It might sound violent but it’s not, though the lady seated in front of me jumped out of her seat at a somewhat unexpected moment in the film!




