Mirage of controlling the bots when playing robot bridge on BBO

I have to be honest with this one, playing bridge on BBO is awesome although a bit muted and feeling kind of a lonely affair. It’s not the bridge you play with real people down at your local club, but you can get your groove going at any time of day or night, and if you play a decent careful game then masterpoints are up for grabs.

However, mastering GiB robots is not an easy task!

Fair disclosure I’ve only been playing on BBO for half a year now. But I did play a sustained number of years of bridge, a while back. Knocking off couple of games with dear old GiB robot (as a partner) proved I had to learn restraint.

There’s been many occasions where I was simply left null over the choices GiB makes during auctions. Recap of strange GiB bidding from past week:

  • To my 1S opener GiB responds 2C, followed by 3C and then by 5C (over my 4S) as he dummies his hand of 5 clubs under 10 and 9 honor points
  • 1S opener from GiB and his hand only has 1 small spade and 11 honor points
  • on my 1H opener followed by 1S on my left then my Gib partner goes Dbl for 3 times in a row, me calling Pass three times in a row, and finally by GiB’s will his hand showing 13 honor points and no handy distribution

At times I get fed up with these bugs, because I reason they must only be programming bugs on GiB’s part, nevertheless you’ve got to play it as it lays, and I find it mostly annoying with a hint of cumbersome to continue and be reasonable and cold inside, in my mind, in order to put up a good declarer game.

Long story short, my hope is to come up with a valid list of advises, for BBO players out there, on how to properly manage GiB auction and contract discovery:

  • Pass a lot
  • 2 level interventions, like 2D 2H and 2S, are very dangerous, better to forget about them when playing GiB
  • remember you always have the best hand and at most your GiB partner can only have as many honor points as yourself
  • quickly jumping into a 5C or 5D contract is taken as a slam invite by your friendly GiB partner, beware
  • slow and constructive auctions are a no go zone for GiB, better figure out the final contract by yourself and call it quickly.. 3NT or 4 majors
  • high level Dlb is considered by GiB to be invitational, which a human player will immediately understand as a penalty double, hence you’ll most likely lose your grip on the auction
  • your first auction call is the most important step to describe how many honor points your hand presents and that’s a big clue to not underbid by GiB’s side
  • with your side having clearly the game it’s better to let GiB declare, when possible, as GiB is a fast player
  • .. more to come
Advertisements

Jasper reports – multiple queries per .jrxml file

Using a <queryString> tag in a jasper document only allows one SQL statement. In fact you can add as many SQL statements as you like but only the first one will be processed.

But since almost any report will nicely do with more than one query, the way to achieve it is to use <subDataset> and <datasetRun>. Although these 2 can be used as many times as needed, per jasper document, they can only be embedded in certain tags so be sure you check out the manual.

Example:

<subDataset name="datasetGroupFolders" uuid="0433f4f3-39f4-4505-841a-e5621c781b01"> 
    <parameter name="GroupFoldersParam" class="java.lang.String"/> 
    <queryString> 
        <![CDATA[SELECT STUFF((SELECT ', ' + CollectionName FROM GroupCollections WHERE $X{IN, CollectionID, GroupFoldersParam} FOR XML PATH('')) ,1,1,'') AS GroupFolders]]> 
    </queryString> 
    <field name="GroupFolders" class="java.lang.String"/> 
</subDataset>

 

<componentElement> 
    <reportElement positionType="Float" stretchType="RelativeToTallestObject" x="0" y="65" width="552" height="15" isRemoveLineWhenBlank="true" uuid="fc7d22c7-8c60-4ecb-974f-c842becc4bf7"/> 
    <jr:list xmlns:jr="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical"> 
        <datasetRun subDataset="datasetGroupFolders" uuid="1e20fa2b-bb3a-475f-b721-5a13d3c374eb"> 
            <datasetParameter name="GroupFoldersParam"> 
                <datasetParameterExpression><![CDATA[$P{GROUP_FOLDERS}]]></datasetParameterExpression> 
            </datasetParameter> 
        </datasetRun> 
        <jr:listContents height="15"> 
            <textField isStretchWithOverflow="true"> 
                <reportElement stretchType="RelativeToTallestObject" x="0" y="0" width="552" height="15" uuid="eac696b9-e20f-48a3-b70d-b186f5e649d6"/> 
                <textFieldExpression><![CDATA[IF($F{GroupFolders}.isEmpty(), "", "Group folders: "+$F{GroupFolders})]]></textFieldExpression> 
            </textField> 
        </jr:listContents> 
    </jr:list> 
</componentElement>

 

 

Powershell – code snipets

  • delete everything from Recycle Bin
$Recycler = (New-Object -ComObject Shell.Application).NameSpace(0xa)
$Recycler.items() | foreach { rm $_.path -force -recurse }
  • generate GUID
[guid]::NewGuid().ToString()
  • OS version
(Get-WmiObject -class Win32_OperatingSystem).Caption
  • username
[Environment]::UserName
  • SQL instances
(Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server').InstalledInstances

IIS error 503: Service unavailable

Very frustrating stuff getting error 503 corroborated with the following entry in the event viewer:

The worker process for application pool ‘DefaultAppPool’ encountered an error ‘Cannot read configuration file
‘ trying to read configuration data from file ‘\\?\<EMPTY>’, line number ‘0’. The data field contains the error code.

This happened to me after a Windows 7 system was upgraded to Windows 10 Pro x64, and enabling IIS. The default IIS page on the localhost wouldn’t show up.

Instead the HTTP error 503 would be front page and center.

Solution: bit of hint to resolve it was from the default IIS pool, DefaultAppPool, which wouldn’t -ever- start!

Navigating on the local file system: C:\inetpub\temp\appPools you should find a folder named DefaultAppPool. In my case I had a shortcut! That needs to be corrected, something like this:

  • run inetmgr
  • locate the default pool (or any other pool that fails to start)
  • click on pool’s name from the right pane chose View Applications
  • change the pool of the application to something else
  • go back to the list of pools and delete the invalid pool
  • then recreate DefaultAppPool / invalid pool
  • click the pool that the application got changed, the View Applications and assign back the default pool to it
  • restart IIS

At this stage the DefaultAppPool foder should appear in the C:\intepub\temp\appPools and the default, or your local website, should load up.

No more pesky error 503!

TeamViewer: Not ready. Please check your connection

TeamViewer proved to be a nice piece of software every now and then.

Have been using it since version 5 and up to it’s latest v12 incarnation, on systems spanning from Linux, OSX and of course Windows.

This morning thou, on a Windows 7 64bit system, the v12 of TeamViewer (which has been up and happy for like forever) refused to SignIn with it’s back-end; the error:

Not ready. Please check your connection.

It just kept throwing this message whatever I was doing:

  • reset the system
  • uninstall and reinstall
  • disable the Antivirus (Webroot secure Anywhere)

One think did help but I’m not happy about it:

  • turning off the system’s Firewall

 

Is the datastore flag /Scenario/GlobalFlags/AreProductFeaturesSupported set did not pass

That’s the error I got when attempting to install SQL Server 2008 R2 on a system running Windows 10 Enterprise x64:

Is the datastore flag /Scenario/GlobalFlags/AreProductFeaturesSupported set did not pass

An extremely easy fix is to run the SqlSupport.msi package, which is part of the installation media from which the SQL Server 2008 R2 is installed (just search it in there).

The SqlSupport.msi runs pretty quickly and on the face of things doesn’t do much.. well apart from fixing the above error.

Then it’s again back to the main installer, in order to catch errors in the act I’m running it like this:

.\setup.exe /CONFIGURATIONFILE=ConfigurationFile.ini

It did run almost normal and up until almost the very end where it stopped yet again with another error:

Condition "Is the user's scenario set to EditionUpgrade" did not pass

Steps I did to get over this second error:

  • run all of the below from an Administrator account
  • backup the user databases (if needed)
  • completely remove all SQL Server 2008 (and related) packages from Control Panel -> Programs and Features
  • backup the registry
  • reboot the computer
  • delete the following registry keys (using regedit): HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server and HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
  • go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and delete all the sub-keys referencing SQL Server
  • go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete all keys referencing SQL Server
  • delete the SQL Server folder from: C:\Program Files\Microsoft SQL Server
  • reboot the computer
  • reinstall SQL Server 2008 R2

 

Thoughts on technology

You can chose to play bridge at a club, or online.

If you’re short on time but you’re still keen on staying alert and fresh in your bridge endeavors then it’s a must to play whenever you can.. like you know: on your way forth and back from work, when you’re stuck in traffic, in a queue of your choice, or waiting for the sleep to come.

So your close friends must be the GIB robots from BBO (Bridge Base Online). You can buy them for a period of time (say a day) and use them to play for money. Or you can open a table with 3 other robots for a quickie.. like a game of 4 or an unlimited stream of hands. You get the picture..

But my take is from another angle. So for every one of us lonely and sad players of bridge there is a potential of 3 robots ready and willing. Are they smart enough, well that’s another story. However, they are there!

But let’s extend this: for every one of us sad and lonely human beings there is always a computer waiting (if you don’t have one or yours gets some ransomware.. ha ha – again another subject but still very close), and there’s also another:

  • smartphone waiting
  • smart fridge waiting
  • smart TV waiting
  • smart car waiting.. Tesla
  • smart wearable waiting
  • tablet
  • RF chip
  • something technical smart and ready enough to help us out
  • Software (in all of them)

Help us.. you say!

Hmm, the other day my little one asked an interesting question, when do numbers finish, as in 1, 2, 3..

Well, my question of same sorts would be: where does smart pieces of technology finish?

Are these numbers double / triple (in stocks waiting to be shipped, or live and kicking) more than humans! Somehow we, humans live and kicking, have created a dormant army of devices which at the moment help us out.. still.

 

Prayer for parents

(‘Ruga pentru parinti’ by Adrian Paunescu, he was a Romanian poet, journalist and politician, 1943 – 2010; this is my interpretation from original)

 

Enigmatically silents
Almost finishing their craft
Near us but they’ll depart
Our sweet dear, dear parents.
Oh God please call them, back
All their hardship long and done
Call and make them young once more
Even younger than we are.

 

For the ones who gave us birth
Issue something just because
And delay their passing cross
Bless them start afresh on earth.
They payed off all of their life
For their children’s many bungle
Oh God keep them all alive
Keep them parents who’ll be gone.

 

Pay attention how they go
Pay attention how they’re gone
Candle’s light this crib alone
They are silent like a snow.
Illnesses of soul and flesh
Take us all into our grave
Whilst we’re here, while they are
Hang in near to your parents.

 

And this earth keeps filling in
Saying goodbye rips us apart
Why oh why, my dear father!
Why oh why, my dear mother!
Oh and why these longest faces
My dear daughter and dear son
I’m the one who’s time is closer
My dears I’ll go too in little while.

 

Why oh why, my dear father!
Why oh why, my dear mother!
You be safe, my dear son!
You be safe, my dear daughter!
Oh dear father, oh dear son,
Oh dear mother, dear daughter.