The Spinner of War
October 24, 2009 12:30 PM   Subscribe

How difficult would it be to modify/simplify this Java spinner so I can better model war for my Intro to International Relations class?

I've used the NCTM's probability spinner in my Intro to International Relations class the last couple terms, and if possible, I'd like to modify it slightly to fit my activity slightly better.

I use the spinner as part of a class activity on bargaining and war. Pairs or groups of students are asked to divide a resource (something tangible - candy or laundry money, depending on how generous I feel that term) either through negotiation or by "war" (spinning the spinner). It costs a couple candy bars or some quarters to spin, but one player will get all of the remaining resource.* Sometimes the probabilities are even, sometimes they're lopsided, sometimes there's a third option in which all of the MiniSnickers go into my tummy, and sometimes the probabilities are hidden from the players. It's been a popular activity, and a handful of students enroll in the class every term because they've heard about it from their friends.

The NCTM probability spinner has worked reasonably well every time I've used it, but I think I make the activity work better with some minor (I hope) modifications. In particular, I'd like a spinner that:

-Doesn't return extraneous information (extraneous for my purposes, that is) - number of spins, results frame, cumulative experimental/theoretical counts.
-Allows for private/hidden probabilities. When I work with the NCTM spinner, I have to turn the projector off to hide them, and then wait for it to warm back up for the big reveal.

Basically, the NCTM's spinner is a fantastic way to illustrate probability and large-sample properties, but I'd like to make it fit my bargaining game more closely.

The big challenge - I have zero experience with Java. If it matters, I work in R and typeset with LaTeX, so I have some experience with ridiculous programming languages. Is it possible to modify the NCTM's spinner easily? Should I just find a student who can do it and pay him/her to do it for me?

View Page Source shows me what seems to be the code, but I'm guessing Spinner.class is another set of code that's being referenced.

var AppClass ="Spinner.class";
var AppWidth = "600";
var AppHeight= "700";
var Version1Dir = "";
var OtherTags = "codebase=tools/spinner/";
var EmbedStyleParams = "num_sects=\"4\" isAdjustable=\"true\"";
var Params = "";

*It's James Fearon's argument, basically - in bargaining situations, war is inherently costly, and a negotiated settlement that leaves both players better off always exists.
posted by brozek to Computers & Internet (9 answers total)
Unless you have the source code, there is not much you can modify. The javascript on the page contains parameters to the java applet. These you can change, but it doesn't look like there are many options here.
posted by whiskeyspider at 12:41 PM on October 24, 2009

Best answer: There's no download link, so I don't think would be any way to get the source and modify it. Your best bet would be to email them and ask for the source, or if they could make the changes you need.

Really though, for a competent java programmer, writing an app like you need would probably take a day or so. Talk to someone in the CS department, they can probably find someone to write it for you pretty cheaply. And -- as much as I hate to say it -- if you are going to write it (or have it written) from scratch, Flash might be better.

But really, it's a one day project. Not worth trying to modify the existing code.
posted by delmoi at 12:44 PM on October 24, 2009

After a few minutes searching I'm guessing that this was created with Math Insight. Their site says that they have something called Math Insight Pro which .. allows teachers, math specialists, curriculum planners, or other support staff to create new Math Insight activities or modify existing one... I can't find much information on the web about availability so you need to contact SRI.
posted by rdr at 12:56 PM on October 24, 2009

A few more minutes reveals that Math Insight is dead but there is a follow on project called Escot that had a Spinner component. Unfortunately it looks like ESCOT died in 2002. Maybe you could contact the authors.
posted by rdr at 1:20 PM on October 24, 2009

Response by poster: Thanks for the excellent answers - I'm going to contact NCTM, SRI, and Escot just in case, but it sounds like hiring a CS student would be a good way to go. Thanks!
posted by brozek at 1:32 PM on October 24, 2009

I swear that this is my last comment but here's a java class that will do the spinner for you, at least that's what the website says.
posted by rdr at 1:36 PM on October 24, 2009

Try a different technology.

Get two ten-sided D&D nerd dice. Roll both, interpreting the first one as the tens' place, the second as the ones' place, in a two digit number. This gives you a value between 00 and 99.

Prior to the roil, assign the percentage possibly of each possible outcome. Then convert this into an absolute range, by adding the percentage possibly of the Nth outcome to the sum (outcome1 .. outcome N-1). (E.g, possibilities of 50%, 30%, 20% become ranges 0-49, 50-79, 80-99. Or interpret "00" as one hundred, if you wish: 1-50, 51-80, 81-00.)

Take the number you've rolled, see into what range it falls, and that gives you the outcome for "spin".

As you can write up multiple tables of percentages, you can display them all without mentioning which you'll use. You can even explore mixed strategies, or "tipping points", by making an initial roll of one die that selects the table to use for the subsequent roll.
posted by orthogonality at 6:01 PM on October 24, 2009

At my school, the Information Technology department has resources to do one-off programming assignments for profs. The computer science department would also know what students would be capable of and interested in a little freelance programming.
posted by MadamM at 6:15 PM on October 24, 2009

Response by poster: Just an update if anyone's interested - I applied for a small grant, and the Computer Science Club is going to take on the project as their Fall-term fundraiser. Win, win, win - it's good for them, good for me, and good for my future students!
posted by brozek at 8:21 AM on October 28, 2009

« Older The puzzling Palmaris Longus   |   Was this a date? Newer »
This thread is closed to new comments.