Back to top

Game Theory - Repeated Prisoner's Dilemma with Unknown Number of Rounds

I went to a "smart athletic people's conference" and we played some games. Of course, the "smart" side of it meant that some of the games should be "heady" games. So, I included a game theory game:

Game 1 - Pricing Game:

You sell beer. You have one competitor who also sells beer. Each day you and your competitor have two choices for your price that day: a high price or a low price. There are four possible outcomes:

  Competitor
  LowHigh
YouLow(1,1)(3,0)
&nbspHigh(0,3)(2,2)

The numbers represent the profit you make that day in the order of (Your Profit, Competitor Profit). So, if you both choose "low" then the result is "1,1" meaning you each get 1. If you choose low and the competitor chooses high then you will get 3 and he will get 0.

Note that the game is symmetrical: "you" and "competitor" can be flipped and the results are the same.

How we will play the game:

Everyone will get two small cards - one that says "high" and one that says "low". We will play until this program tells us to "quit":

import random
limit = 0
loop = 1
while loop == 1:
again = random.randint(0,100)
if again > limit:
print "play again"
limit +=1
loop = input("time for next round? 1 or 0: ")
else:
print "%d rounds, quit now!" % (limit)
loop = 0

I ran this program several times and got results between 3 and 27 rounds. It could theoretically go about 100 rounds, but that's pretty unlikely.

Your score: the sum of the results from each round. For example, if you and your competitor both chose low every time and the game lasted 3 rounds your scores would both be 3.

People Involved: 
timeline: 

BarCamp Denver

BarCamp Denver is coming up soon. It will be what we make of it - more of a Do-ocracy than anything else I know.

It should be a great time. I plan to present my favorite technology of the moment - <a href="http://drupal.org>Drupal and if I can get off my buttocks perhaps write and show off one of the modules I've been thinking about writing.

Category: 
People Involved: 
timeline: 
Location: 

Google On Site Search - Only useful if you don't already use URL Parameters

I read the Inside AdSense Blog because monetization is FUN! Today I woke up to see that they now have a search box that will give results right inside your own page which is a great step beyond their previous effort (the previous effort allowed you to do some basic theming of the results page...pretty useless). So, I got all excited and hooked it up on UAGDSE.com and if you try it out what you'll find is that the search code and Drupal get mad at each other.

A Little History

Drupal, like many web applications, originally used URL parameters to create its URLs. Things like ?q=node/3 or ?q=admin let the system know that the user is requesting the "node/3" page or the "admin" page. Over the years people figured out fancy ways to make URLs work without the ?q= but Drupal still supports this notation in case your configuration doesn't allow the rewriting magic necessary. It's also handy for when you recompile apache and forget rewrite and your site breaks - then you can still get into ?q=admin/settings and fix stuff.

The Google vs. Drupal conflict

The way this becomes a problem is because Google's search expects to be able to use the "q=" parameter and it creates URLs like http://uagdse.com/uagdse-results?q=term which then confuses Drupal into thinking that I'm asking for a page named term which doesn't exist. The funny thing is that when you do a google search for a path that actually exists and is available (like node/198) then Drupal returns that page quite nicely.

I'm not sure what the fix is. I can imagine one solution being to use a more specific url parameter than "q" like "dq" but I doubt we're going to get the millions of people using Drupal to change. I can also imagine a setting in Drupal for "no really, ignore, I only want clean URLs so please ignore any q= in the URL parameters" but that doesn't feel right. Of course, part of the reason I'm writing about this is a little lazyweb plea for someone with a better idea on how to fix it.

People Involved: 

FON in more languages and Spain reaches 10,000 foneros

FON Website in More Languages

As I happened on the site this morning I noticed that the FON website now has language buttons for "EN|ES|FR|DE|IT|NL|SE" and several characters that appear as ??? for me but seem like Japan, Hong Kong, Korea, and Taiwan. Some of these just seem to point at their blog and not specifically translations of the main site, but all the same it's exciting to see FON continue expanding linguistic reach along with physical reach.

Category: 
People Involved: 

Firefox Quick Search of Drupal.org

Stop Wasting Time when you Search

I frequently find myself doing two things:

  1. Using the google site: keyword to search Drupal.org
  2. Using the Drupal search to search Drupal.org

I'm also a believer that the fewer keystrokes the better, especially in light of RSI experienced by "professionals" doing computer work. So, why not eliminate a couple hundred keystrokes a day with a Firefox quick search?

Get the Bookmarks

Here are three links to bookmark:

People Involved: 

Our Neighbor - Mixed Media Wall Sculpture and Functional Artist

We have this friend and neighbor Nancy Frazier Greager who is an artist and does mixed media wall sculpture and functional art. It's really cool stuff in my opinion using some of my favorite materials in simple and attractive ways.

Last weekend Nikki was up at at the Loveland Sculpture in the Park festival which apparently was lots of fun, but not as good as Nancy's mixed media sculptures and art.

People Involved: 
Location: 

Pages

Subscribe to Knaddison.com RSS