Saturday, March 28, 2009

Fun with multipv

Best moves after 1.d4 Nf6 2.c4

  1. ... e5 score -0.23 (Budapest Gambit)
  2. ... e6 score -0.25
  3. ... Nc6 score -0.25
  4. ... c5 score -0.35 (Benoni Defense)
  5. ... d5 score -0.39 (Queen's Gambit)
  6. ... b6 score -0.47
  7. ... c6 score -0.58
  8. ... Na6 score -0.6
  9. ... d6 score -0.6 (Old Indian Defense)
  10. ... Ne4 score -0.66
  11. ... g6 score -0.66 (King's Indian Defense)
  12. ... a6 score -0.74
  13. ... h6 score -0.8
  14. ... b5 score -0.82
  15. ... h5 score -0.9
  16. ... a5 score -0.96
  17. ... Nh5 score -1
  18. ... Ng4 score -1.11
  19. ... Rg8 score -1.11
  20. ... g5 score -1.13
  21. ... Ng8 score -1.17
  22. ... Nd5 score -4.66

The popular King's Indian Defense is pretty far down the list.

setoption name Hash value 500

setoption name MultiPV value 500

ucinewgame

position startpos moves d2d4 g8f6 c2c4

go depth 23

info multipv 1 score cp -23 depth 23 time 38329514 nodes 86410529468 nps 2254412 pv e7e5 d4e5 f6g4 c1f4 f8b4 b1c3 b4c3 b2c3 b8c6 g1f3 d8e7 d1d5 f7f6 e5f6 g4f6 d5d3 d7d6 e2e3 c6e5 d3c2 e5g6 c4c5 g6f4 c5d6 f4g2 f1g2 e7d6

info multipv 2 score cp -25 depth 23 time 38329600 nodes 86410529468 nps 2254407 pv e7e6 g1f3 f8b4 c1d2 b8c6 e2e3 e8g8 d2b4 c6b4 f1e2 d7d6 e1g1 c7c5 b1c3 c8d7 d4c5 d6c5 a2a3 b4c6 d1c2 d8a5 f3g5 c6e5 f1d1 a8d8

info multipv 3 score cp -25 depth 23 time 38329600 nodes 86410529468 nps 2254407 pv b8c6 g1f3 e7e6 e2e3 f8b4 c1d2 e8g8 d2b4 c6b4 f1e2 d7d6 e1g1 c7c5 b1c3 c8d7 d4c5 d6c5 a2a3 b4c6 d1c2 d8e7 f3g5 h7h6 g5e4 c6e5

info multipv 4 score cp -35 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv c7c5 e2e3 e7e6 d4d5 b8a6 g1f3 d7d6 b1c3 f8e7 f1d3 e6d5 c4d5 a6b4 d3b5 c8d7 b5d7 f6d7 e1g1 e8g8 e3e4 e7f6 c1f4 d8e7 a1b1 f6c3 b2c3 b4a2 b1b7 a2c3

info multipv 5 score cp -39 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv d7d5 c4d5 c7c6 d5c6 b8c6 e2e3 e7e5 g1f3 e5d4 f3d4 f8d6 b1c3 e8g8 f1e2 c6d4 d1d4 d8e7 e1g1 f8d8 d4h4 c8f5 f1d1 e7e5 c1d2

info multipv 6 score cp -47 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv b7b6 e2e3 c8b7 g1f3 e7e6 b1c3 f8b4 c1d2 c7c5 f1e2 e8g8 e1g1 b8c6 e2d3 c5d4 e3d4 b4e7 d2f4 c6b4 f3g5 b4d3 d1d3 d7d5 c4d5 b7d5 c3d5 d8d5

info multipv 7 score cp -58 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv c7c6 g1f3 e7e6 e2e3 f8e7 f1d3 d7d5 e1g1 d5c4 d3c4 e8g8 b1c3 c6c5 f3e5 b8c6 e5c6 b7c6 d4c5 e7c5 d1f3 c8d7 e3e4 a8b8 f1d1

info multipv 8 score cp -60 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv b8a6 b1c3 c7c5 d4d5 d7d6 e2e4 e7e5 g1f3 f8e7 a2a3 d8b6 f1d3 e8g8 c3a4 b6c7 e1g1 c8d7 a4c3 c7b6 b2b3 f6g4 c1d2 a6c7

info multipv 9 score cp -60 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv d7d6 g1f3 b8a6 b1c3 c7c5 e2e3 g7g6 f1d3 f8h6 e1g1 e8g8 a2a3 c8g4 h2h3 g4d7 d1b3 d8c8 f1d1 c8c6 e3e4 h6c1 a1c1 c5d4 f3d4

info multipv 10 score cp -66 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv f6e4 g1f3 e7e6 e2e3 f8b4 b1d2 e4d2 c1d2 b4d2 f3d2 b8c6 f1d3 e8g8 e1g1 d7d6 d1c2 d8h4 d2f3 h4h5 c2b3 e6e5 d4d5 c6e7 a1c1 e7f5 c4c5

info multipv 11 score cp -66 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv g7g6 b1c3 c7c5 d4d5 f8g7 g1f3 e8g8 e2e4 d7d6 f1e2 c8d7 e1g1 b8a6 c1f4 f6h5 f4d2 d8b6 d1b1 a6b4 a2a3 g7c3 b2c3 b4a6 b1b6 a7b6

info multipv 12 score cp -74 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv a7a6 b1c3 c7c5 d4d5 b7b5 e2e4 b5b4 c3a4 f6e4 f1d3 e4f6 a4c5 e7e6 c5a4 e6d5 c4d5 f8e7 g1f3 c8b7 e1g1 f6d5 d3c4 d8a5

info multipv 13 score cp -80 depth 23 time 38329601 nodes 86410529468 nps 2254407 pv h7h6 b1c3 e7e6 e2e4 f8b4 e4e5 f6e4 d1c2 d7d5 e5d6 e4d6 f1d3 c7c5 a2a3 b8c6 a3b4 c6b4 c2d1 c5d4 d1a4 b4c6 c3e4 e8g8 e4d6 d8d6 g1f3

info multipv 14 score cp -82 depth 23 time 38329602 nodes 86410529468 nps 2254407 pv b7b5 c4b5 a7a6 e2e3 e7e6 g1f3 f8e7 f1d3 a6b5 d3b5 e8g8 b1c3 c8a6 e1g1 a6b5 c3b5 c7c5 c1d2 b8c6 f3e5 c6e5 d4e5 f6e4 b5c3 e4c3 d2c3

info multipv 15 score cp -90 depth 23 time 38329602 nodes 86410529468 nps 2254407 pv h7h5 g1f3 e7e6 b1c3 f8b4 e2e3 e8g8 f1d3 c7c5 e1g1 b8c6 c1d2 d7d5 a2a3 c5d4 e3d4 d5c4 d3c4 b4a5 b2b4 a5b6 d2e3 c8d7

info multipv 16 score cp -96 depth 23 time 38329602 nodes 86410529468 nps 2254407 pv a7a5 b1c3 e7e6 e2e4 f8b4 e4e5 f6e4 d1c2 d7d5 g1f3 b8c6 f1e2 f7f6 e1g1 b4c3 b2c3 f6e5 d4e5 e8g8 c1a3 f8f7 a1b1 b7b6 c4d5 e6d5

info multipv 17 score cp -100 depth 23 time 38329602 nodes 86410529468 nps 2254407 pv f6h5 e2e4 g7g6 f1e2 f8g7 e2h5 g6h5 g1e2 c7c5 e1g1 d7d6 d4c5 d6c5 d1d8 e8d8 e2f4 b8c6 f4h5 g7e5 h5f4 d8e8 b1c3 e5c3 b2c3 h8g8 c1e3 b7b6

info multipv 18 score cp -111 depth 23 time 38329602 nodes 86410529468 nps 2254407 pv f6g4 b1c3 e7e5 e2e3 e5d4 e3d4 g4f6 f1d3 f8b4 g1e2 d7d5 c4d5 d8d5 e2f4 d5d6 d1e2 d6e7 e2e7 b4e7 f4d5 f6d5 c3d5 e7d6 e1g1 e8g8 c1d2

info multipv 19 score cp -111 depth 23 time 38329834 nodes 86410529468 nps 2254393 pv h8g8 b1c3 c7c5 e2e3 d7d6 f1d3 b8c6 g1e2 g7g6 e1g1 f8g7 d3c2 c8d7 d4c5 d6c5 e2f4 c6b4 c1d2 g6g5 f4d3 b4c2 d1c2 d7f5 c2a4 f6d7

info multipv 20 score cp -113 depth 23 time 38329895 nodes 86410529468 nps 2254389 pv g7g5 c1g5 f6e4 g5f4 c7c5 b1d2 e4d2 d1d2 c5d4 d2d4 h8g8 d4d2 b8c6 g1f3 d7d6 e2e4 d8a5 d2a5 c6a5 f3d4 g8g4 g2g3 f8g7 e1c1 c8d7

info multipv 21 score cp -117 depth 23 time 38329895 nodes 86410529468 nps 2254389 pv f6g8 b1c3 g8f6 e2e4 c7c5 d4d5 d7d6 f1d3 b8a6 a2a3 e7e5 f2f4 e5f4 c1f4 f8e7 g1f3 c8g4 e1g1 f6h5 f4e3 e8g8 d1b3 d8b6

info multipv 22 score cp -466 depth 23 time 38329895 nodes 86410529468 nps 2254389 pv f6d5 c4d5 e7e6 e2e4 e6d5 e4d5 f8b4 b1c3 e8g8 f1d3 d7d6 d1h5 f7f5 g1e2 b8d7 e1g1 d7f6 h5f3 c8d7 c1g5 h7h6 g5d2 f6g4 a1e1

info nodes 86410529468 nps 2254389 time 38329895 hashfull 1000

Friday, March 20, 2009

Chess players whose names begin with the letter K

Keres. considered one of the strongest players never to become World Chess Champion

Korchnoi. considered one of the strongest players never to become World Chess Champion

Karpov. World Champion 1975–1985, 1993-1999

Kasparov. World Champion 1985-2000

Kramnik. World Champion 2000-2007

Khalifman. World Champion 1999

Kasimdzhanov. World Champion 2004

Kamsky.

Karjakin. Youngest grandmaster in history

Kaufman. Senior Champion 2008, programmer of champion chess programs

Kosteniuk. Women's World Champion 2008

Kosintseva.

Koneru. second highest rated woman

Wednesday, March 18, 2009

Free throws missed per minute of play

An interesting basketball statistic for a player.

Stop = Go

Devise a sentence such that the word "stop" can be substituted for the word "go" but the meaning doesn't change.

"Hey hey! Ho ho! The genocide [in Darfur] has got to go! "

Different userlands

Different userlands on the same machine.

PATH munging

Never assume standard locations of anything.

Additional benefit that every package may be installed in a randomized PATH so one application cannot easily access another unless it's been told how.

Tax War on Drugs

If drugs are legalized but taxed at an extremely high rate, there could be no change for consumers (drugs still remain very hard to get), but the difference is that the tax revenues go to support whatever our taxes normally support instead of Latin American drug cartels busy killing each other and American Spring Breakers in the crossfire.

Legalize only those drugs that are these days mostly imported.

Keep the import ban in place, or impose an additional import tariff (to balance out the fact that drugs grow better near the Equator) to apply further economic pressure to drive the drug cartels out of business.

Domestic drugs must be grown and processed in secure licensed facilities. The tax is applied on exit of the secure facility. This thwarts a black market.

Fun to modify

Beyond design for modifiability.

The worst is closed-source software. Microsoft.

Next better is software for which source is provided, but you are not permitted to modify it and recompile it. Tivo. But at least you can see what the software is doing so you can decide whether to run it, or trust it, and understand and work around bugs.

Next better is open-source Free (as in speech) software.

Next better is Design for Modifiability, mentioned earlier. Well-documented clean modular code with lots of hooks is one possible characteristic. An easy mental model of how things work.

And now, a new category beyond that: Fun to Modify. Low barrier to entry to modify, instant gratification. This one is psychological.

Morbid talking bathroom scale

"Your weight is ___. Your Body Mass Index is ___. You will die in ___ years and ___ days."

The last sentence is calculated from your age, sex, weight, BMI, and population statistics of expected remaining lifespan of a person with those values.

Infected

When was the exact moment you caught that cold or other infectious disease, when the bacterium or virus (etc.) that would eventually multiply throughout your body first entered your system? What action brought it into your body, and through which orifice? Whom did you catch it from?

The problem is, I cannot foresee science and technology ever being able to reliably answer these questions. It seems one would have to monitor and track every object inside and outside your body at microscopic resolution.

Spending and saving

The difference between spending and saving is not so clear cut. Real estate.

This is a flaw in the idea of substituting sales tax for income tax.

Perhaps spending becomes saving only when a good is sold. On the market. An exception made for commodity goods with well-established market prices.

Sending a message to Santa

Is it possible to use an unfactored integer, for example the 20th Fermat number, to public-key encrypt a message that can only be read by a being with powers greater than currently possessed by the human race?

What is God's public key?

If God writes back, can we check the signature?

We would like the private key to depend on the complete factorization, not just a partial -- you never know when a small factor could be discovered by the elliptic curve method.

Or some other public key cryptosystem than RSA.

Cameras must tell their subjects

Whenever an electronic camera (a digital camera or an analog camera with any electronic components, such as a flash) takes a picture, it must also emit a unique radio beep announcing it is taking a picture. Video cameras must emit a continuous radio tone. Also sound recorders.

A person can wear a monitor so they can know when they might have been photographed.

If a person fears being photographed by a camera with a telescopic lens, they can wear a giant antenna to detect the distant radio beep.

Certainly "bad guys" may get a hold of illegal cameras. But if confronted with a photograph of yourself from an illegal camera (which you can determine by examining your monitor) you have leverage back that the photographer was using an illegal camera.

Radio beepers are extremely cheap. Digital cameras may already emit a radio beep as a side-effect of normal operation, so make that one of the possible legally required emission, and those cameras may continued to be used unmodified legally.

Radio-less cameras may be operated with written permission of the subject.

But I don't like this idea. It stinks of Defective By Design. It assumes anyone who wants to covertly photograph or film something is up to no good, while exposing something or someone might be good for society.

Psychohistory

Why doesn't Asimov's Foundation psychohistory work in the real world?

Maybe it does but we don't want to know the answer. Malthus. Every empire inevitably crumbles, and the end is never pretty. We don't want to learn that, over the years, we haven't gotten any "better", for a suitable definition of "better".

Maybe it does, but the answers it gives us are boring. Population will continue to increase, as will productivity.

Maybe it doesn't work because:

Technology causes variance to increase over time, so the model has little predictive power.

We don't keep good enough records, especially suffering from the fact that history is written by the victors.

Laser projector

We don't yet have a consumer device, seen in the film Real Genius, which takes a laser beam, and rapidly points in different directions so as to project a vectorized image, for example,text. One can imagine it's a mirror controlled by some motors.

For images which cannot be drawn with a single stroke, an aperture and shutter are needed. It's important for the shutter not to overheat when closed -- perhaps it is reflects the beam into a heat sink.

Some knobs to adjust linear transformations.

Electronic diploma

You publish something. How can you assert that it is something about which you have expertise? Traditionally one gives credentials of an educational or professional degree. In the modern age, we can do one better. One cryptographically signs the published document, and the key that one signs with is itself signed by the degree granting institution asserting that the subject does have a certain degree in a certain field. This is sort of an electronic diploma.

One can have an anonymous key signed, which makes it possible to anonymously publish something while still asserting a degree. This is traditionally not possible. There is a PKI problem of a compromised account, or a bad alumnus/alumna who creates and divulges many anonymous signed keys which cheapens the degree for all alumni. The ability to search for all documents signed by a particular key helps (to independently investigate whether a particular key may be trusted). Another is to be able to query the degree granting institution about the dilution factor of a key: How many non-revoked anonymous keys does the owner of this key have outstanding?

Another way might be the anonymous signature is generated "live" by the degree institution from a hash of the document and non-anonymous authorization of the subject.

Both have the problem that anonymity might be broken by compromising the institution.

CSI guns

According to CSI, every bullet can be traced back to the gun that shot it by the unique pattern of scratches the gun leaves on the bullet. It's surprising that the assassins' market hasn't spurred the technology to defeat this, for example, a gun which leaves different scratches for every shot. Or perhaps it has; they just don't show it on TV.

Or perhaps they do show it on TV: It's called a "ray gun".

Chess database

The first step is to consider a chess database or opening explorer that works as follows. The user navigates through and selects a leaf of the already evaluated tree and expands it. The computer generates all the children of the node and runs a quick evaluation of all the children. (For more sophistication, use multi PV to only evaluate the most promising of the children.) The key is the minimax value of the children replaces the evaluation of what was a leaf node, and the minimax value is automatically propagated all the way up the tree.

The computer's quick evaluation might not be so good, but by selectively expanding promising lines, the human "expert" or explorer can validate, refute, or correct, in a principled and structured fashion, the computer's analysis.

The initial root node can be the standard chess starting position, or perhaps a position from a game or problem that the user wishes to analyze.

The second step is to place this database interface online so that many people can simultaneously collaborate on the tree, again in a structured, principled manner.

With many users expanding many different nodes simultaneously, we run into a computational bottleneck. The nodes to be evaluated are placed in a priority queue. The priority is some measure of the distance of the node from the "main line". For example, consider a node's ancestors. Each has a delta value of evaluation from the best move at that position (delta is zero if it is the best move ). The distance is the maximum of the deltas of the ancestors.

Big Brother Is Watching You

The problem with security cameras everywhere, in particular, CCTV cameras operated by the state, is that the state, and nefarious agents within it, can access the video footage "too" easily, because it's their "own" cameras.

A solution is to make for any security cameras operated by the state that records "the public", the footage is owned by "the public", access to which is vigorously defended by a public defender.

Every camera must have a law passed for it narrowly circumscribing it's use, and the public defender makes sure those restrictions are followed. We hope to avoid mission creep.

Footage outside the restrictions is also inadmissable in court.

Privately owned cameras that film the public are a problem, especially since the state may move to having all state-owned security cameras instead owned by private shell corporations to skirt the public defender. Perhaps "permanent" private cameras that film the public are inadmissable as evidence unless licensed, and the licensing requires a similar circumscription of use.

Bandwidth between nearby devices

Transfer data wirelessly from one device to another device in close proximity. A common operation, for example one person wants to share his or her media collection with someone else. Thinking for the future, a typical data transfer might be about 1 terabyte.

We are probably limited by the Nyquist frequency. For radio, this is to slow. But infrared, or free-space optical could work.

What is the maximum wireless bandwidth?

Chess Openings

Just a list of some of the most common chess openings, leaving white to move.

  1. (initial position)
  2. e4 e5
  3. e4 e5 Nf3 Nc6
  4. e4 e5 Nf3 Nc6 Bc4 Nf6 (Two Knights Defense)
  5. e4 e5 Nf3 Nc6 Bc4 Bc5 (Giuoco Piano)
  6. e4 e5 Nf3 Nc6 Bb5 a6 (Ruy Lopez, Morphy Defense)
  7. e4 e5 Nf3 Nc6 Bb5 Nf6 (Ruy Lopez, Berlin Defense)
  8. e4 e5 Nf3 Nf6 (Petroff Defense)
  9. e4 e5 Nf3 d6 (Philidor Defense)
  10. e4 c5 (Sicilian Defense)
  11. e4 c5 Nf3 d6 (Sicilian Defense)
  12. e4 c5 Nf3 Nc6 (Sicilian Defense)
  13. e4 c5 Nf3 e6 (Sicilian Defense)
  14. e4 c5 c3 Nf6 (Sicilian Defense, Alapin Variation)
  15. e4 c5 c3 d5 (Sicilian Defense, Alapin Variation)
  16. e4 e6 (French Defense)
  17. e4 c6 (Caro-Kann Defense)
  18. e4 d6 (Pirc Defense)
  19. e4 Nf6 (Alekhine's Defense)
  20. e4 g6 (Modern Defense)
  21. e4 d5 (Scandinavian Defense)
  22. e4 d5 exd5 Qxd5 (Scandinavian Defense)
  23. e4 d5 exd5 Nf6 (Scandinavian Defense, Marshall Gambit)
  24. d4 d5
  25. d4 d5 c4 e6 (Queen's Gambit Declined)
  26. d4 d5 c4 c6 (Slav Defense)
  27. d4 d5 c4 dxc4 (Queen's Gambit Accepted)
  28. d4 Nf6
  29. d4 Nf6 c4 e6
  30. d4 Nf6 c4 g6 (King's Indian Defense)
  31. d4 Nf6 c4 c5 (Benoni Defense)
  32. d4 Nf6 c4 e5 (Budepest Gambit)
  33. d4 Nf6 Nf3 e6
  34. d4 Nf6 Nf3 g6
  35. d4 Nf6 Nf3 c5
  36. d4 Nf6 Nf3 d5
  37. d4 Nf6 Nf3 d6
  38. d4 e6
  39. d4 d6
  40. d4 f5 (Dutch Defense)
  41. d4 g6 (Modern Defense)
  42. c4 Nf6 (English Opening)
  43. c4 e5 (Reversed Sicilian)
  44. c4 e6 (English Opening)
  45. c4 c5 (English Opening)
  46. c4 g6 (English Opening)
  47. Nf3 Nf6 (Réti Opening)
  48. Nf3 d5 (Réti Opening)
  49. Nf3 c5 (Réti Opening)

Some more rarer:

  1. e4 e5 Nf3 f5 (Latvian Gambit)
  2. d4 Nf6 c4 e6 Nf3 b6 (Queen's Indian Defense)
  3. d4 Nf6 c4 e6 Nf3 d5 (Queen's Gambit Declined, transposition)
  4. d4 Nf6 c4 e6 Nf3 Bb4+ (Bogo-Indian Defense)
  5. d4 Nf6 c4 e6 Nf3 c5

Monday, March 16, 2009

Pi slideshow

Pi slideshow

Delay between slides is 2 minutes. The given dates are very much approximate.

Friday, March 13, 2009

One Billion Digits of Pi

One Billion Digits of Pi

Pi formulae

A collection of compact formulas for pi.

Pi formulae

Decimal expansion; Simple continued fraction expansion; Solving e=-1 for π; The sine wave crosses zero; Gregory-Leibniz; Euler; Normal distribution; Machin; Area of quarter circle; Putnam exam; Circumference of semicircle; Brouncker; Wallis; Lange, L J, "An Elegant Continued Fraction for Pi" American Mathematical Monthly vol 106 (1999); http://functions.wolfram.com/Constants/Pi/08/0007/; Viète (NB: The product starts from index k=1. a0 is just used to seed the recurrence.); Riemann Zeta(2); Ramanujan; Bailey Borwein Plouffe; Brent Salamin Gauss Legendre arithmetic-geometric mean (AGM)

LaTeX Source

Thursday, March 12, 2009

Massive covert manipulation of the public

Two related questions: What caused the gasoline price spike of 2008? Why did the United States go to war with Iraq in 2003?

The two questions are related by "shouldn't have". The price of gasoline eventually came back down, and if we knew then what we know now about how the war turned out, the American people would not have permitted the war go forward.

The final decision of gasoline prices is of course determined by millions of consumers deciding whether to buy gasoline at a given price. But there seems to have been something else going on in the background that specifically caused the price spike. It doesn't seem to have been a sudden increase in demand, or a sudden decrease in supply, so the answer is not clear.

The final decision to go to war was of course determined by Congress, whose members depend on the votes of millions of constituents to remain in office. How did so many people get convinced that going to war was the right thing to do? The answer is not clear.

Conspiracy theorists would have us believe that a small faction (for example, hedge funds for one, Israel for the other) orchestrated the events and caused them to happen. But because the "final decision" is cast by millions of people, such a conspiracy would require the covert yet massive manipulation of the public to a degree I have not thought possible and would be frightening if it is. (Of course, advertising routinely overtly manipulates the public this way; the issue is the covertness: we still don't know if such manipulation occurred and if so who was behind it. )

Further study of these events is warranted.

Thin nail

How thin can you make a nail? It must remain stiff and strong enough to be hammered into wood. (It doesn't have to stick well.) Obviously, the material out of which the nail is made is key.

Hanging a picture.

Goo machine

A vending machine where the user can adjust sweetness, saltiness, fatness, sourness, savoriness (MSG), hotness, addictives like caffeine or vitamins, and the machine mixes up and dispenses a goo according to the user's specifications.

Also one may add color dyes and synthetic fragrances.

Newtonian Black Holes

Black holes, i.e., objects so dense that light cannot escape them, can exist just fine under Newton's theory of gravitation. It's a simple exercise to calculate the "event horizon", the sphere surrounding a point mass where the escape velocity is c. The answer turns out to be completely wrong. Einstein's contribution was correctly predicting their size and the nature of space and time in their vicinity.

Japanese automatic furigana

I seek a tool that will attach pronunciation hiragana (furigana) 振り仮名 to kanji. Although this is a difficult natural language processing problem because of ambiguity, such a tool probably already exists.

English fluency

Devise a fairly difficult language fluency exam. Advertise that all your employees who interact with customers have passed it.

Shades of racism.

Backpacked mobile device

Consider a two part mobile device. One part is very dumb and small and handheld. The other part is larger, designed to be carried in a backpack. The large part contains the power-hungry and voluminous components: main radios, plenty of disk storage, powerful CPU, and large battery. The small part contains only a display and a low-power radio with a range of only a meter or so for communicating with the large component.

Stroked digital art

Looking through the galleries of the Facebook Graffiti app one finds impressive examples of art people make despite its very simple interface.

What does one want in a drawing program? Start with a circular brush of color and opacity specified. The umbra of the brush optionally has a "penumbra" of user-specified thickness through which the opacity decays to zero (fully transparent). Next the brush may be be squashed to an ellipse and rotated to any angle.

Be able to control the thickness of the brush via stylus pressure. Allow calligraphy: the stylus may be rotated.

Zoom.

Layers. Translucency. One layer as an alpha mask.

Undo. Store both a complete edit history -- every stroke and action and time. This gives insight into the mind of the artist, how the final product was created. Open source art. And be able to access an abbreviated history, with the undos spliced out.

A palette of previous colors and brushes. A dropper for select a previous stroke (possibly from an undo history) and reapply it. Or select its color or brush. Dropper interface might be first select all strokes under a given point. Narrow by layer, time, approximate color or shape.

Insert an image as a layer for the purposes of tracing. Image transformations: rotate translate, linear transforms. One intends the image not be visible in the final product, but there is nothing stopping you.

Although the file format is open, we limit the interface so that every stroke is purely created by hand. No copy and paste. It's kind of a cross between Photoshop and Illustrator but crippled in some places.

Select individual spline points. Strokes that gradually change color are possible.

It's all encoded underneath with splines, so it's a vector format. An artist could design a mural on a small handheld device.

Open source art. On commission, or sale, or releasing to public domain for say government-supported "stimulus" art, the complete edit history is available so the buyer can go on to modify.

Diamonds

How old is a typical diamond? How did its carbon get underground? Is it biological carbon subducted by tectonic forces? Or is it carbon from the formation of the earth?

One experiment that could be done is to dump a whole bunch of specially tagged carbon (with impurities) into subduction trenches all around the world, and see if you get tagged diamonds out in a few million or billion years.

Start the experiment now, write down some records, and hope that whatever civilization or species that is around then (probably not us), can read our records and interpret the results.

What experiments has humanity carried out lasting longer than say two generations?

Building checklist

How can a building be designed poorly?

Let's stop repeating old mistakes.

Create a universal checklist, perhaps with thousands of questions, that should be asked about a building's design and architecture before construction begins.

For a public building, the checklist, and the architectural firm's responses, should be public.

Black holes and the Uncertainty Principle

Does the singularity at the center of a black hole violate the Heisenberg Uncertainty Principle? By definition it's a point so its position may be known to arbitrarily high precision. It's velocity seems to be able to be measured within bounds, too.

Perhaps it's OK to violate the laws of physics so long as you are inside an event horizon -- no one on the outside will ever find out.

Or more likely the laws of quantum mechanics need to be fixed to apply to regions of spacetime so curved as to be a singularity.

Anarchy

It's interesting that the socially optimal level of anarchy might not be zero. Society may have some socially sub-optimal institutions so deeply entrenched, which have contorted the system so much to remain in place, that no socially permitted methods will be able to get rid of them, even though it is socially preferable (Pareto) to do so. In fact, such entrenchment of institutions may be a natural progression of society.

How can we induce the socially optimal level of anarchy? Licenses (a get out of jail free card)? Rolling a get out of jail free die at trial? Or do nothing, hoping that society naturally breeds the optimal level of "patriots" willing to sacrifice it all?

How can one determine the optimal level of anarchy? This may be easier: perhaps a historical study or survey between different countries or if all else fails, trial and error, measuring GDP or some other measure of social happiness.

Natural disasters do inject some anarchy into society, though probably not a "socially optimal" amount.

Accessing your cell phone remotely

The sad thing about losing your phone, or forgetting to bring it with you, is losing the list of contacts. It would be nice to be able to call up your phone from some other phone or device, (perhaps a web interface?) enter a password, and access, import, or download your contacts list.

Wednesday, March 11, 2009

Radical rasterizing rendering problem

\[\sqrt{6 \sum_{n=1}^{\infty}\frac{1}{n^2}}\]

gs -sDEVICE=ppmraw -sOutputFile=- -r200x200 -dNOPAUSE -q -dBATCH pi-1.ps

Anyone one know how to prevent the inconsistency of the line width rule of the upper bar of the square root sqrt radical in LaTex?

Thursday, March 05, 2009

Xen paravm kernel initrd

Create a paravm using the default kernel, hope for the best. xen_create_image.

Install the distro's Xen kernel inside the paraVM, allowing it to create an initrd automatically.

Copy out of the paravm the initrd (and vmlinuz kernel) into the host (dom0) and point the kernel= and initrd= configuration parameters to it.

Wednesday, March 04, 2009

Unlucky

Do most people experience a completely normal life? How much does luck have to do with it?

While the probability of any single bad unfortunate event (e.g., being a victim of terrorism) occurring to you is very low, so low you rationally shouldn't worry about it, what is the probability that some low-probability horribly life-altering event will occur to you sometime in your lifetime? This may be one of those situations involving summing (and appropriate subtraction if not independent) of a large number of very small probabilities, an operation which humans find very non-intuitive. In the simplest case, people have a hard time estimating the value of (1-epsilon)^BIG for given epsilon and BIG.

As opposed to trying to enumerate and quantify all possible low-probability events (and their joint distribution!), a totalistic method to get at the answer to the question is to survey the population -- "Are you the victim of a low-probability horribly life-altering event?". One must take into account a person's age. One must also make a correction for those people for whom their life-altering event resulted in death, or being otherwise unable or unwilling to respond to the survey.

Armed with the answer, we can then ask the question, are people behaving optimally in the face of this total risk? If so desired, what actions can people take to hedge against this total risk whose every component is small enough to be negligible?

Star field simulation

It's been a while since I last saw the Windows star field simulation screensaver. What would it look like with modern graphics hardware? Lots of stars, running at the full refresh rate of the display, 85 to 120 Hz. Rendered motion blur.

Rocket science pioneers

It amazes me that early rocket scientists, Goddard, von Braun, et al., didn't blow themselves up. Certainly they had plenty of opportunities to do so, and did not have today's hindsight of all the ways that could go wrong of combining fuel and oxidizer in the right proportions to produce a violently explosive mix, and then trying to control that explosion. Perhaps they got famous only because they didn't die.

Regenerative brakes on trains

Do subways and light rail (and monorail) use regenerative braking? Their stop-and-go nature indicates an ideal use case.

Real-world aperiodic tiling

Tiles which tile only aperiodically may have practical implications to crystallography.

I used to think the quest for shapes which tile only aperiodically, culminating in the discovery of Penrose tiles in 2D, was only a curiosity of recreational mathematics and was not relevant to real life. I realize now that aperiodic tilings may in fact theoretically be relevant for real life because of X-ray crystallography. Imagine there existed a molecule, perhaps an important protein in the human body or of a pathogen, whose shape is such that it only tiles aperiodically. (Can such a single three-dimensional aperiodic tile exist?) (Update: Schmitt-Conway biprism, einstein problem.) However, X-ray crystallography, the best way to determine the exact 3D structure of a molecule, only works for periodic tilings, and one cannot grow a crystal of this aperiodic molecule. Any attempt to grow a crystal yields an aperiodic amorphous mass which does not diffract properly. Thus, one could end up with an important molecule whose structure we want to know, but it is fundamentally impossible to discover it.

Mexico City

http://en.wikipedia.org/wiki/Center_of_population#World

If the population of Mexico City increases (by a lot) how does the worldwide center of population change? Can the center exhibit discontinuous jumps?

Komi auction for chess matches

Consider a chess match where the players do not alternate colors between games; instead, one player plays white the entire match and the other has the black pieces for every game of the match.

Statistics and conventional wisdom have white having an advantage due to opening initiative. The question is then how to equitably award black a handicap to equalize the advantage.

A naive technique is to have an auction of the number of match points white is willing to allow black to start off with. Whoever bids a higher number gets to play white, but starts out in the hole behind in the match that number of match points.

The problem is this is too discrete. For a given length of match, both players will likely bid the same handicap, and the next increment of handicap will give the other player too much of an advantage.

Another way to do it is to fix the handicap at 0.5 match points (that is, black gets draw odds if both players win the same number of games), and the players bid on the length of the match. Whoever bids a lower number gets to play white, and has that many games to see if he or she can capitalize on having white to overcome black's handicap points. For longer matches, the fixed handicap may be 1.5 match points.

The advantage of a half-integer handicap is the match cannot end in a draw, so there is no need for rapid/blitz/Armageddon tiebreaks.

This format of the match is mutually beneficial to both players as each only needs to prepare half an opening book. It benefits spectators who will likely see a deeper theoretical discussion.

Kakistocracy

Someone should study very carefully what went horribly wrong in the 2000 Republican primary, the 2000 Presidential election, and the 2004 Presidential election that Americans could nominate, elect, then re-elect one of the worst presidents ever. It is a stunning failure of American democracy, one that we should take great care never to repeat.

As painful as the memory is now, and great desire to "move on", this study should be done sooner rather than later before the relevant primary sources die off or are lost.

Jury selection

Consider a jury trial whose underlying issue is so polarizing that the trial's outcome is predetermined by jury selection: the arguments of the trial are irrelevant. Suppose that proportion p of the population believe guilt and (1-p) believe innocence, from which a jury pool of 12+2n will be selected. Both the prosecution and defense each remove n candidates during voir dire, leaving 12. (Is this how jury selection really works?) Assume, for now, that both parties can accurately predict a juror's vote. What is the probability that the jury will be unanimous for one side or the other?

If a jury hangs, due to non-unanimity, a mistrial is declared. Assume the prosecution will keep re-prosecuting the case until a verdict is returned. As a function of p, what are the probabilities of the eventual verdict (in which, by chance, greater than 12+n of the original pool favored one side)? How many trials does it take?

This model may be made more complicated by allowing errors in each party's ability to "read" a juror, possibly asymmetric. Game theoretically, jurors may choose to lie about how they feel in order to avoid being excused.

How to win the lottery

A hundred numbered balls are placed in an urn, and one winning ball will be drawn. People may buy $1 tickets betting on the ball that will be drawn. After the state, which runs the lottery, takes its cut, the lucky ticketholder wins the remaining jackpot. The jackpot is split if there are multiple people who bought the same winning ticket.

Suppose you and 45 other people enter the lottery. But the 45 other people are stupid, and all of them buy the same ticket for the same number, say lucky number 7. You buy 100 tickets, buying every number. What is your expected payoff? Say the state's cut is 30%. The lottery revenues are $145. After subtracting the state's cut, the jackpot is $101.50. If the 7 ball is not chosen, which happens 99% of the time, then you win the entire jackpot. If the 7 ball is chosen the $101.50 jackpot is split 46 ways, so your share is about $2.21. Thus your expected net payoff is -100 + 0.99*101.50 + 0.01*101.50/46 = $0.50706521739 which is positive. Normally any gambling game is a losing proposition (the house always wins), but in this case, the 45 other "stupid people" in the game are essentially offsetting the state's cut.

The next question is, how can one tell if a lottery has positive expected return? In other words, how can one tell if all the other players in the game have bought such a skewed distribution of tickets so as to offset the state's cut? Here are two ways.

If all players choose their tickets randomly, then we should expect a certain distribution of how high the jackpots will rise until they are won. By observing how the jackpots rise compared to how they should theoretically behave for random players, one can obtain a measure of the skew on how people choose their lottery numbers. One may also detect if someone else is also buying all the tickets.

One may obtain a more detailed picture of the numbers people choose by observing the winning numbers each time the jackpot is won. The winning numbers represent an unbiased (?) sampling of all the numbers people choose. Sometimes the lottery also releases information about how many ways the jackpot is split. We can also gain negative information about the numbers people do not pick by observing the winning numbers on days no one wins the jackpot.

Golden Corral

If you ever want to take a foreigner to sample truly American cuisine and philosophy, may I suggest the Golden Corral restaurant chain. I'm not sure if I recommend this seriously or in jest.

Go tournament

The game of Go 囲碁 has four nice features. Tens of millions people play it. Humans still play better than computers, so one does not (yet!) need to worry about too much about cheating. Games are guaranteed to have a decisive result (with suitable application of a Super-Ko rule): no draws (tied games).

It is a game of perfect and complete information, so we don't have to worry about defective random-number generators or hacking to see your opponent's cards like poker.

All these features are favorable for an internet-based single-elimination knockout tournament with a cash prize for the winner.

No prize for second place thwarts collusion: helping someone else just hurts your chances of winning the first-place prize. It also lessens the importance of seeding.

All games of a round should be run simultaneously to thwart (but not entirely prevent) people from entering the tournament twice under different names.

I'd also make it rapid play with the tournament being run frequently, perhaps every week. One bad move, or one misbehaving internet connection, and you just have to wait until next week. Rapid play single elimination also levels the playing field somewhat: All the people better than you might make a mistake.

Consecutive tournaments could overlap, a the latter stages of the tournament involve only a small percentage of the original participants.

1024 players, $1 entry fee, $1024 prize and the tournament might just pay for itself. Otherwise we seek a sponsor of about $52000 a year.

It could run on the existing infrastructure of Go servers.

Freedom of speech is hard

Freedom of speech has unimaginable and unlimited upside potential. Historically, we have Paine and Stowe, and the modern scientific revolution and today's technological miracles has its roots in scientists finally getting the point that they should publish their ideas and findings instead of keeping them secret or only for their limited community as they had done for thousands of years prior.

Those opposed to freedom of speech constantly proclaim its downsides: shouts about intellectual property piracy, child pornography, and terrorism certainly are the shrillest these days.

Freedom of speech is fundamentally hard. If you believe in freedom of speech except for That One Thing which you find horribly repugnant and for which you believe speech ought to be curtailed, then with a Murphy's Law-like inevitability, someone will want to say precisely That One Thing. People just like to press other people's buttons. Multiply this effect by the whole population, and it's clear why freedom of speech is constantly being chipped away at.

I'm not a fan of blind faith when it comes to religion, but I believe faith is warranted here. Believe that the good from freedom of speech outweighs the bad, even though the bad is often painfully visible, but the good is hard to see.

Emacs

Emacs is a text editor, but to its fans, it is a religion. Why is it so awesome? To explain why, we look to inspiration in its name.

Emacs stands for Editor MACroS. Macros may be used to extend and improve the base editor in unlimited ways, and such extensions are easily createable by any user via Emacs Lisp or C-x (. Emacs Lisp is such a good extension language that a large parts of the editor itself are written in Emacs Lisp. Other editors may have macro capabilities, but few, if any, are as good as Emacs Lisp.

There are keyboard macros with C-x ( and C-x e and you can make named defuns in your .emacs. If you are not using these features, you are not using the full power of Emacs, you are just using an editor with lots of features, which is not unique to Emacs. Even vim and Microsoft Word have lots of features. Its extensibility is what make Emacs so awesome. You shouldn't be allowed to take the Emacs side of the Holy War until you've written at least one defun.

Electronic photo ID

Electronic photo ID signed by the state cryptographically

It seems pretty straightforward for the state to issue, at the same time as a physical driver's license or photo ID, a cryptographically signed electronic version containing the same information: name, photograph, height, etc. The DMV can e-mail it to you. It's useful to have an ID you can't easily lose, that you can make a backup of. The state cryptographically signs the document, so the photo or details cannot be altered. An electronic version allows for a high-resolution photograph which may be effective in distinguishing people who look alike. It could even include additional biometric information such as a video demonstrating speech and gait and fingerprints. Biometric information is creepy, and it is important that the state may sign a document without keeping a copy of it.

Electronic versions of birth certificates may be issued the same way.

Doing good

Tragedy is the protagonist trying to do good, but failing and making things worse.

Comedy is the anti-hero protagonist intent on evil, but ends up doing good.

Cynical thoughts on chess draws

If you don't like draws in chess, try playing or following a game designed so that draws are not possible. May I suggest Hex which relies on a fixed-point theorem from algebraic topology to prove draws cannot occur.

If two players both want to draw, no rules are going to stop them. In fact, rules attempting to prevent short draws are simply going to make the implicitly mutually agreed drawn games even more outlandish. It's better just to let them draw so it's explicit.

If you follow chess for the love of the game, and you feel two players prematurely agreed to a draw in a position for which which you feel there was still some fight left in it, then simply employ your very own 2700-grandmaster-in-a-box (also known as your computer) to continue the game. Its result is just as good for the love of the game.

If you follow chess for the players and political intrigue, then permitting short draws just adds to that and lets you see the players' personalities and playing styles.

The Christmas Draw rule, where if the first player offers a draw, the draw offer remains open after any subsequent moves, no matter how badly the second player does, seems very interesting and should be tried out. Its flaw is negotiated draws via signals: "Shall we go for three-fold repetition?"

Credit cards done right

Now that everybody carries around little computers that can do the mathematical operations required for cryptography, and most vendors have or can get internet, it becomes within the realm of imagination to do credit cards right.

Change

A long time ago, in a galaxy far, far away...

The defeat of the Jedi, who had imposed their will of the status quo for a thousand generations, has brought about a new era of change in the galaxy. Some of the change is good, some not so, but cultures and civilizations now are finally allowed to try. These are their stories...

Cat

Suppose you actually built a Schrödinger's cat box. How would you prove that you built the box correctly, that the cat actually is in a quantum superposition of states?

Car racing unrestricted

The story of modern car racing has been adding more and more restrictions on the car technology. These restrictions have been for the purpose of slowing the cars down to increase driver safety. Restrictor plates in NASCAR are one example.

But before the modern era, improvements in technology could help win the race, and I like this more as a technologist. Perhaps advances in racing cars could benefit consumer cars as well.

I support removal of technology restrictions, but we face the problem of ensuring driver safety, especially in some quantitative way which may be enforced evenly among different race teams who may choose to build their cars in different ways.

One solution is insurance or variant thereof. A team is required to pay, say, $50 million if the driver dies. The team may not start the race until you have proved it can pay (no declaring bankrupcy if the driver dies). It might be tricky to figure out who gets paid to avoid perverse incentives (for example, if the driver's heirs are members of the same racing team). Perhaps some of the money goes to charity.

To prevent injuries as well as death, the team is also required to show that the driver has sufficient health insurance, whose terms include that coverage may not be terminated for injuries (possibly chronic) from racing even if the driver is let go by the team.

Another far more radical solution is to remove the driver from the car. The driver drives by remote control from a virtual reality flight simulator station. I especially like this idea because it will result in improvements in drive-by-wire (and drive-by-wireless) technologies. No doubt cars will incorporate gadgets to help drivers drive better -- these pave the way toward automated cars that drive themselves.

And finally, this is a bit of a digression, but I'd like to see a car-racing league where teams are forbidden from suing each other for patent or trade secret (etc.) infringement. I hope this will encourage the most rapid development of car technology. Certainly patents may be filed and will be relevant if the technology is commercialized.

Another completely different idea is to use truly stock cars, fresh off the dealer lot with no modifications. Every driver drives an identical car so it's all about driver skill. Furthermore, spectators can sympathize because many of them drive the same car.

Botox

I admire the courage of the first volunteer to undergo subdermal injection of botox, botulism toxin, the world's deadliest poison, which can kill you at an absurdly small dosage. LD50 is 1 ng/kg.

Blofeld Grunfeld

Ever noticed that Ernst Blofeld from James Bond and Ernst Grünfeld of King's Indian Defense chess opening have similar sounding names?

It's not a coincidence that Kronsteen and Bronstein have similar names.

Asus Eee keyboard and Kinesis

It would be nice to see a small touchscreen computer mounted in the big empty space in the middle of the Kinesis keyboard. With some kind of appropriate adapter, it might be possible to home build it with an iPhone.

Aluminum foil

Aluminum foil is an interesting substance. It is very thin, yet completely impervious to light (contrast with paper). It is easily accessible to everyone, reasonably sturdy, but may be cut without special tools. It is the ideal material for the aperture of a home-made pinhole camera.

3d hexagon

In two dimensions, the regular square tiling has the awkwardness that there exist pairs of squares which touch just at a corner. It makes the adjacency graph non-planar. The regular hexagon tiling does not have this problem; any pair of hexagons either shares an edge or does not touch at all.

In three dimensions, polyhedra may touch at a face, an edge, or a vertex. Is there a tiling polyhedron that if two polyhedra touch, they share positive surface area? Or share at least a face or an edge (not touching just at a vertex)?

I suspect not. In two dimensions, the dual of the hexagon tiling (the adjacency graph) consists of simplices (triangles). In three dimensions, tetrahedra do not tile.