Pen-and-paper role-playing games (RPGs) began as an expansion of rules for historical tabletop miniatures wargames. Tabletop wargame rules were concerned with creating accurate simulations of historical battles -- including medieval battles, such as Agincourt. Early RPGs modeled "heroes" as having the equivalent strength of several ordinary soldiers, and added rules for fantastic creatures, magic, and advanced technology. But the rules kept realism as the base case, so an ordinary soldier could fight, travel, heal, etc. in a manner approximating real life unless assisted by magic or advanced technology.
Imposing realistic times for travel and healing worked in the pen-and-paper game since all the players typically formed a single "party", and the referee could arbitrarily move the time-line ahead to skip weeks of boring travel or healing. This flexibility matched that which naturally happened in the opposite direction, where a few minutes of simulated combat time often took hours of real time to resolve. This freedom to manipulate the time-line was retained when RPGs were first moved onto computers. Many single player computer RPGs are still turn-based, and allow the player (sometimes controlling an entire party) to stop time while providing orders to each character. Again a few minutes of simulated combat can take longer to resolve (though computerization makes fast resolution much easier). And many games still allow time to be sped up during travel or healing.
Unfortunately this flexibility disappears with massively-multiplayer online RPGs. These provide the same persistent world model for all the players, so the time-line must move forward at the same fixed rate for everyone. A "realistic" mechanic for healing or travel would impose an unacceptable level of boredom on the players. Instead these games allow characters (even without specialized magical or technological assistance) to quickly heal and travel long distances between encounters.
This common mechanic from online RPGs is currently filtering back into the newest revisions of classic paper-and-pencil RPGs. The "old school gamers" are understandably concerned and confused. They don't see the need, since the referee is always free to speed up the time-line. And those from a simulation (especially miniatures) background don't like the loss of realism.
Sunday, March 14, 2010
Monday, February 15, 2010
Conflicting World Models in Conflict Simulation
Many board games have been created to simulate past military conflicts. They are often created to explore "what ifs", alternative choices the opposing commanders hypothetically could have made at the time. A basic problem, of course, is that we have hindsight knowledge (though sometimes still incomplete) of what actually happened.
To simulate "fog of war" games sometimes hide the positions or strengths of opposing troops. More rarely the strengths of untested "green" troops are even hidden from their own commanders. Elaborate scenario start conditions also try to recreate the historical limitations faced by commanders at the time: troops hopelessly out of position or delayed due to political restrictions, surprise, disrupted communications, etc.
What these games rarely represent, however, is that commanders sometimes start with fundamentally different understandings of "basic game mechanics", such as the effects of mapboard terrain on movement, supply, and combat. Many historical battles have hinged on one side believing certain terrain was impassible by many unit types. The classic gaming example is the Ardennes forest at the beginning of both WW I and II. A "historically correct" gameboard for the French would show it impassible to mechanized units, while the German gameboard would show it passable. Since the "after the fact" map has the terrain passable, the French player will of course want to defend it accordingly. Thus the elaborate setup-rules necessary to prevent this and ensure at least the possibility of achieving the historical outcome. But here the most important element of surprise, that of one commander suddenly discovering his world-model is incorrect, is lost.
This limitation becomes more acute the further players try to maneuver beyond the historical outcome. Since these alternative paths were (figuratively and literally) never explored, we have little idea where their differing world models would have broken down in conflict with reality.
To simulate "fog of war" games sometimes hide the positions or strengths of opposing troops. More rarely the strengths of untested "green" troops are even hidden from their own commanders. Elaborate scenario start conditions also try to recreate the historical limitations faced by commanders at the time: troops hopelessly out of position or delayed due to political restrictions, surprise, disrupted communications, etc.
What these games rarely represent, however, is that commanders sometimes start with fundamentally different understandings of "basic game mechanics", such as the effects of mapboard terrain on movement, supply, and combat. Many historical battles have hinged on one side believing certain terrain was impassible by many unit types. The classic gaming example is the Ardennes forest at the beginning of both WW I and II. A "historically correct" gameboard for the French would show it impassible to mechanized units, while the German gameboard would show it passable. Since the "after the fact" map has the terrain passable, the French player will of course want to defend it accordingly. Thus the elaborate setup-rules necessary to prevent this and ensure at least the possibility of achieving the historical outcome. But here the most important element of surprise, that of one commander suddenly discovering his world-model is incorrect, is lost.
This limitation becomes more acute the further players try to maneuver beyond the historical outcome. Since these alternative paths were (figuratively and literally) never explored, we have little idea where their differing world models would have broken down in conflict with reality.
The Future of Amplification
Recently there have been several positive reviews of the NAD M2 Direct Digital Amplifier (white paper). It is the first of its kind, and I expect many more amplifiers like this will follow.
Today most audio sources are digital: CD/SACD, DVD/Blu-Ray, HDTV, PC/MP3 server, etc. These signals are passed through a digital-to-analog converter, have volume control applied, and are passed as analog signals to the amplification stage. Even current class D amplifiers accept an analog signal, convert it to a PWM (pulse width modulation) digital signal, and use that to generate the final amplified analog signal sent to the speakers.
The NAD M2 is unique in keeping the input digital signals in the digital domain as long as possible. It accepts PCM (pulse code modulation) digital inputs, applies volume control digitally, and converts the PCM to PWM for output by the class D amplifier. Keeping the signal digital as long as possible eliminates all the possible noise sources in the redundant digital-to-analog-to-digital conversions, and the lossy analog connections between source, pre-amplifier and power amplifier.
(Yes, I deleted my previous audio post as I realized I was spreading disinformation. I am currently fascinated by the topic, and will keep trying.)
Today most audio sources are digital: CD/SACD, DVD/Blu-Ray, HDTV, PC/MP3 server, etc. These signals are passed through a digital-to-analog converter, have volume control applied, and are passed as analog signals to the amplification stage. Even current class D amplifiers accept an analog signal, convert it to a PWM (pulse width modulation) digital signal, and use that to generate the final amplified analog signal sent to the speakers.
The NAD M2 is unique in keeping the input digital signals in the digital domain as long as possible. It accepts PCM (pulse code modulation) digital inputs, applies volume control digitally, and converts the PCM to PWM for output by the class D amplifier. Keeping the signal digital as long as possible eliminates all the possible noise sources in the redundant digital-to-analog-to-digital conversions, and the lossy analog connections between source, pre-amplifier and power amplifier.
(Yes, I deleted my previous audio post as I realized I was spreading disinformation. I am currently fascinated by the topic, and will keep trying.)
Sunday, January 24, 2010
Cycles of Explanation in Economics
In areas of science such as physics and biology our successive theories developed over time are better and better explanations of the observed facts. Think heliocentrism versus geocentrism, or natural selection versus Lamarckism. But in economics I suspect this is not always the case. Traumatic events like the Great Depression, or (hopefully) the current crisis can force a brief period of clarity. But over time economic forces will result in the mainstream replacement of the theory which most closely matches the observed facts of the previous crisis with a theory which maximizes short term profits for powerful actors. The time-frame over which this shift occurs is probably a generation, in which those with first-hand memories of the previous crisis leave power.
Here are two exhibits for my point. The first is a quote I have been re-sending for years:
"When business in the United States underwent a mild contraction in 1927, the Federal Reserve created more paper reserves in the hope of forestalling any possible bank reserve shortage. More disastrous, however, was the Federal Reserve's attempt to assist Great Britain who had been losing gold to us because the Bank of England refused to allow interest rates to rise when market forces dictated (it was politically unpalatable). The reasoning of the authorities involved was as follows: if the Federal Reserve pumped excessive paper reserves into American banks, interest rates in the United States would fall to a level comparable with those in Great Britain; this would act to stop Britain's gold loss and avoid the political embarrassment of having to raise interest rates.
The "Fed" succeeded; it stopped the gold loss, but it nearly destroyed the economies of the world in the process. The excess credit which the Fed pumped into the economy spilled over into the stock market -- triggering a fantastic speculative boom. Belatedly, Federal Reserve officials attempted to sop up the excess reserves and finally succeeded in braking the boom. But it was too late: by 1929 the speculative imbalances had become so overwhelming that the attempt precipitated a sharp retrenching and a consequent demoralizing of business confidence. As a result, the American economy collapsed. Great Britain fared even worse, and rather than absorb the full consequences of her previous folly, she abandoned the gold standard completely in 1931, tearing asunder what remained of the fabric of confidence and inducing a world-wide series of bank failures. The world economies plunged into the Great Depression of the 1930's."
Gold and Economic Freedom, Alan Greenspan, 1967.
Here the Greenspan of 1967 believed holding Fed rates too low caused a bubble that could not be cleaned up afterwards. But the Greenspan of the late 1990s and again early 2000s no longer believed low rates caused bubbles, or that a bubble could be too large for the Fed to clean up afterwards. Why the shift? I think the earlier theory fits the facts of the 1920-30s (and our current situation now) better. But note his successor Ben Bernanke still denies low rates cause bubbles.
A second exhibit is the presentation I wrote in 2006 and posted as Black Swans in the Market in 2008. I showed that any Statistics 101 student could easily demonstrate that daily stock prices changes are not normally distributed. This makes people like the CFO of Goldman Sachs, who claimed in 2007 "We were seeing things that were 25-standard-deviation events, several days in a row" look extra-silly. Why were they using such bad models? Is finance in general so ignorant of basic statistics[*]? No, they are simply choosing models which maximize their short-term profits -- and bonuses.
[*] OTOH, a Google Books search on "which shows a histogram of the daily returns on Microsoft stock" shows that as of 2005 Brealey et. al. were still peddling this nonsense to unsuspecting MBA students in their Principles of Corporate Finance and related texts. A 2005 edition apparently shifted the MSFT date range from 1986-97 to 1990-2001 (omitting the crash of 1987!). Later editions don't hit on the search terms; no idea if they have cleaned up their act.
Here are two exhibits for my point. The first is a quote I have been re-sending for years:
"When business in the United States underwent a mild contraction in 1927, the Federal Reserve created more paper reserves in the hope of forestalling any possible bank reserve shortage. More disastrous, however, was the Federal Reserve's attempt to assist Great Britain who had been losing gold to us because the Bank of England refused to allow interest rates to rise when market forces dictated (it was politically unpalatable). The reasoning of the authorities involved was as follows: if the Federal Reserve pumped excessive paper reserves into American banks, interest rates in the United States would fall to a level comparable with those in Great Britain; this would act to stop Britain's gold loss and avoid the political embarrassment of having to raise interest rates.
The "Fed" succeeded; it stopped the gold loss, but it nearly destroyed the economies of the world in the process. The excess credit which the Fed pumped into the economy spilled over into the stock market -- triggering a fantastic speculative boom. Belatedly, Federal Reserve officials attempted to sop up the excess reserves and finally succeeded in braking the boom. But it was too late: by 1929 the speculative imbalances had become so overwhelming that the attempt precipitated a sharp retrenching and a consequent demoralizing of business confidence. As a result, the American economy collapsed. Great Britain fared even worse, and rather than absorb the full consequences of her previous folly, she abandoned the gold standard completely in 1931, tearing asunder what remained of the fabric of confidence and inducing a world-wide series of bank failures. The world economies plunged into the Great Depression of the 1930's."
Gold and Economic Freedom, Alan Greenspan, 1967.
Here the Greenspan of 1967 believed holding Fed rates too low caused a bubble that could not be cleaned up afterwards. But the Greenspan of the late 1990s and again early 2000s no longer believed low rates caused bubbles, or that a bubble could be too large for the Fed to clean up afterwards. Why the shift? I think the earlier theory fits the facts of the 1920-30s (and our current situation now) better. But note his successor Ben Bernanke still denies low rates cause bubbles.
A second exhibit is the presentation I wrote in 2006 and posted as Black Swans in the Market in 2008. I showed that any Statistics 101 student could easily demonstrate that daily stock prices changes are not normally distributed. This makes people like the CFO of Goldman Sachs, who claimed in 2007 "We were seeing things that were 25-standard-deviation events, several days in a row" look extra-silly. Why were they using such bad models? Is finance in general so ignorant of basic statistics[*]? No, they are simply choosing models which maximize their short-term profits -- and bonuses.
[*] OTOH, a Google Books search on "which shows a histogram of the daily returns on Microsoft stock" shows that as of 2005 Brealey et. al. were still peddling this nonsense to unsuspecting MBA students in their Principles of Corporate Finance and related texts. A 2005 edition apparently shifted the MSFT date range from 1986-97 to 1990-2001 (omitting the crash of 1987!). Later editions don't hit on the search terms; no idea if they have cleaned up their act.
Sunday, January 3, 2010
Multi-Core Ant Colony Optimization for TSP in Go
Go is a new statically typed, garbage collected, concurrent programming language. It is native compiled and offers near-C performance. Like Erlang it uses a CSP model of lightweight processes ("goroutines") communicating via message passing. Messages can be synchronous (unbuffered) or asynchronous. Go supports multi-core processors.
On my usual ACO TSP test case Go is the best performing language so far. On a single core it was 2.8x slower than C, beating the previous best Shedskin Python. Go's speedup from 1 to 2 cores was 1.9, matching previous best Erlang. With 4 cores Go exceeds C's single core performance -- the first tested language to achieve this goal.
Go's lightweight processes are scheduled onto OS threads by the Go runtime system. This allows the system to support many more processes. I was able to run ACO TSP with 100,000 ant processes. The runtime system scheduler appears to treat these processes somewhat like futures, lazily scheduling them when another process is blocking on receipt of a message from a shared channel. This is inefficient for the type of parallel processing used in ACO (many seconds of parallel computation ending with a single message send), as only a single process (and thus a single core) is active at a time. This is a known issue, and the simple solution suggested on the golang-nuts mailing list is to add runtime.Gosched() calls to yield the processor. For my case this was insufficient, and adding additional heartbeat messages to each process helped force maximal multi-core usage.
See here for code and more details.
On my usual ACO TSP test case Go is the best performing language so far. On a single core it was 2.8x slower than C, beating the previous best Shedskin Python. Go's speedup from 1 to 2 cores was 1.9, matching previous best Erlang. With 4 cores Go exceeds C's single core performance -- the first tested language to achieve this goal.
Go's lightweight processes are scheduled onto OS threads by the Go runtime system. This allows the system to support many more processes. I was able to run ACO TSP with 100,000 ant processes. The runtime system scheduler appears to treat these processes somewhat like futures, lazily scheduling them when another process is blocking on receipt of a message from a shared channel. This is inefficient for the type of parallel processing used in ACO (many seconds of parallel computation ending with a single message send), as only a single process (and thus a single core) is active at a time. This is a known issue, and the simple solution suggested on the golang-nuts mailing list is to add runtime.Gosched() calls to yield the processor. For my case this was insufficient, and adding additional heartbeat messages to each process helped force maximal multi-core usage.
See here for code and more details.
Sunday, December 20, 2009
Science Fiction Physics, and Biology
The January 2010 Scientific American article "Looking for Life in the Multiverse" analyzes how much the laws of physics might differ while some form of life is still possible. It specifically shows that carbon-based life is still possible when the weak nuclear force is eliminated. The authors are less supportive of non-carbon-based life popular in science fiction, and still find support for the anthropic principle ("conditions that are observed in the universe must allow the observer to exist") in the precise value required for the cosmological constant.
Also, in an earlier post I claimed that all life on earth is dependent on the sun for energy. This is incorrect. The black smoker sea vents on the ocean floor support complete ecosystems including archaea, clams, and tubeworms. Here the energy comes from the interior of the earth instead of the sun.
Also, in an earlier post I claimed that all life on earth is dependent on the sun for energy. This is incorrect. The black smoker sea vents on the ocean floor support complete ecosystems including archaea, clams, and tubeworms. Here the energy comes from the interior of the earth instead of the sun.
Monday, December 14, 2009
Science Fiction Morality
In an earlier post I questioned the existence of atheist essentialist philosophers. I had been looking in the area of Philosophy of Science. Turns out a better place to look is Moral Philosophy. Moral Philosophy presents a moral spectrum, from Moral Nihilism (nothing is moral or immoral), to Moral Relativism (morals are relative to individual, social, cultural, or historic circumstances), to Moral Universalism (applies to "all similarly situated individuals") to Moral Realism (moral statements can be objectively true, and subject to rules of logic). In Moral Realism moral rules are similar to Platonic Forms or Ideals. Moral Realism is often grounded in religion, but is also supported by some atheist philosophers (example: Quentin Smith).
The boundaries between the positions are often fuzzy, with various proponents subtly repositioning other prominent philosophers. A historical stumbling block has been determining how a Universal Morality can be possible without recourse to a deity (and this is the basis of the "argument from morality", a proof of God's existence). More recently, based on research in Evolutionary Psychology, Steven Pinker wrote a great essay on how a human moral sense or instinct may have evolved. He presents many rules which are specific to the evolved nature of humans, and some which may be more universal. He says:
"Two features of reality point any rational, self-preserving social agent in a moral direction. And they could provide a benchmark for determining when the judgments of our moral sense are aligned with morality itself... One is the prevalence of nonzero-sum games. In many arenas of life, two parties are objectively better off if they both act in a nonselfish way than if each of them acts selfishly... The other external support for morality is a feature of rationality itself: that it cannot depend on the egocentric vantage point of the reasoner..."
It is interesting to consider how many rules the Moral Realist propose are universal, versus specific to the evolved nature of humans. I wonder how much science fiction Moral Realists read. A common theme in science fiction is the presentation of different alien races, and the different moral imperatives which naturally arise from their different evolutionary heritage. Examples are the K'kree (herbivores) and Hivers (one sex) from Traveller. And aside from other planets, we can similarly consider how morals would differ if radically different earth species (sharks? praying mantis? naked mole rats?) had evolved sentience. The Moral Realists imply that all creatures, regardless of evolutionary heritage, will always converge on the same universal morality (or that creatures which are unable to meet the standard can't achieve sentience). This may be a realistic assumption for a few of the meta-universals proposed by Pinker, but I don't think it applies to the much larger set of rules proposed by the Moral Realists. And without this universality the attempt to use rules of logic falls apart.
The boundaries between the positions are often fuzzy, with various proponents subtly repositioning other prominent philosophers. A historical stumbling block has been determining how a Universal Morality can be possible without recourse to a deity (and this is the basis of the "argument from morality", a proof of God's existence). More recently, based on research in Evolutionary Psychology, Steven Pinker wrote a great essay on how a human moral sense or instinct may have evolved. He presents many rules which are specific to the evolved nature of humans, and some which may be more universal. He says:
"Two features of reality point any rational, self-preserving social agent in a moral direction. And they could provide a benchmark for determining when the judgments of our moral sense are aligned with morality itself... One is the prevalence of nonzero-sum games. In many arenas of life, two parties are objectively better off if they both act in a nonselfish way than if each of them acts selfishly... The other external support for morality is a feature of rationality itself: that it cannot depend on the egocentric vantage point of the reasoner..."
It is interesting to consider how many rules the Moral Realist propose are universal, versus specific to the evolved nature of humans. I wonder how much science fiction Moral Realists read. A common theme in science fiction is the presentation of different alien races, and the different moral imperatives which naturally arise from their different evolutionary heritage. Examples are the K'kree (herbivores) and Hivers (one sex) from Traveller. And aside from other planets, we can similarly consider how morals would differ if radically different earth species (sharks? praying mantis? naked mole rats?) had evolved sentience. The Moral Realists imply that all creatures, regardless of evolutionary heritage, will always converge on the same universal morality (or that creatures which are unable to meet the standard can't achieve sentience). This may be a realistic assumption for a few of the meta-universals proposed by Pinker, but I don't think it applies to the much larger set of rules proposed by the Moral Realists. And without this universality the attempt to use rules of logic falls apart.
Subscribe to:
Posts (Atom)