Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Analyzing data in a Monopoly Game?

Reply
Thread Tools

Analyzing data in a Monopoly Game?

 
 
Mike P
Guest
Posts: n/a
 
      10-20-2005
This should be fairly straightforward, but I can't figure out how to
approach this.... I'd appreciate any ideas you have.

Goal:

Make recommendations on what a Monopoly player should do with the
houses/hotels, cards and cash they have. (i.e., what should they
mortgage/unmortage, where should they build, etc.)

What I have:

I have created a calculator to figure out the relative value of any
board setup... so any setup I give the script, I can figure out how good it
is. (http://www.psmonopoly.com/calc/propstats.htm). If you try it, the page
will show you the relative value of your setup under RESULTS at the top.

The user has given me their current setup (what they own, what's
mortgaged, what has houses, etc.), how much money they have on-hand, how
much money they want to keep on-hand after the recommendations.

What I'd like to do:

Cycle through every conceivable thing they could do (mortgage a property
here, unmortage one there, build a house here, sell a house there, etc.),
compare the relative values of all the setups, and tell them which would be
their best choice. These options are limited by monopoly rules and what
they have to play with. For example, they have to build evenly, so a user
can't have four houses on one property and the other mortgaged in the same
monopoly. They can't build more houses than they have cash to buy, and they
can only change what they have (i.e., they can't build on a property unless
they own the whole block).

Where I'm stuck:

I haven't the foggiest notion of how to use javascript to loop through all
the configurations.

I assume, once I figure out how to loop through all the user's options, I
can create a two dimensional array, containing specifics of the monopoly
config, and the relative value I calculate for it, then find the highest
relative value, and show them the delta between how the board is set up now,
and how it should (optimally) be set up.

Any thoughts?



 
Reply With Quote
 
 
 
 
Douglas Crockford
Guest
Posts: n/a
 
      10-21-2005
> Where I'm stuck:
>
> I haven't the foggiest notion of how to use javascript to loop through all
> the configurations.


JavaScript is closely related to Scheme, so any sort of AI approach
could be easily accomodated. See
http://www.crockford.com/javascript/little.html
 
Reply With Quote
 
 
 
 
Lee
Guest
Posts: n/a
 
      10-21-2005
Mike P said:
>
>This should be fairly straightforward, but I can't figure out how to
>approach this.... I'd appreciate any ideas you have.
>
>Goal:
>
> Make recommendations on what a Monopoly player should do with the
>houses/hotels, cards and cash they have. (i.e., what should they
>mortgage/unmortage, where should they build, etc.)
>
>What I have:
>
> I have created a calculator to figure out the relative value of any
>board setup... so any setup I give the script, I can figure out how good it
>is.


That's not really enough. Maximizing the next move is likely to lead to
dead ends from which there is no "better" move.

Consider the case in the best strategy would be to sell one property
in order to finance the purchase of a hotel. Having the hotel instead
of that property might be clearly favorable, but looking one move ahead,
you're not going to see any advantage to selling the property.

 
Reply With Quote
 
Mike P
Guest
Posts: n/a
 
      10-21-2005
"Lee" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...

> That's not really enough. Maximizing the next move is likely to lead to
> dead ends from which there is no "better" move.
>
> Consider the case in the best strategy would be to sell one property
> in order to finance the purchase of a hotel. Having the hotel instead
> of that property might be clearly favorable, but looking one move ahead,
> you're not going to see any advantage to selling the property.


Lee, you make a good point. The calculator, as it stands now, uses long
term probability of landing on a square (assuming infinite rolls),
multiplied by the payoff should your opponent land on the square. I think
it's a fairly good measure, though your point is well taken. Monopoly
depends heavily on the dice roll. I'm not currently factoring in where
players are situated on the board, nor am I factoring in how their
opponent(s) are setup. So regardless of what they do, the next roll can
change things significantly... they might lose with the next roll of the
dice.

Still, I have to begin somewhere.... and I believe this is a good place to
start. Any ideas on how to do the data analysis.... or even a better
overall approach?

Thanks!

Mike


 
Reply With Quote
 
RobG
Guest
Posts: n/a
 
      10-21-2005
Mike P wrote:
> "Lee" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>
>
>>That's not really enough. Maximizing the next move is likely to lead to
>>dead ends from which there is no "better" move.
>>
>>Consider the case in the best strategy would be to sell one property
>>in order to finance the purchase of a hotel. Having the hotel instead
>>of that property might be clearly favorable, but looking one move ahead,
>>you're not going to see any advantage to selling the property.

>
>
> Lee, you make a good point. The calculator, as it stands now, uses long
> term probability of landing on a square (assuming infinite rolls),
> multiplied by the payoff should your opponent land on the square. I think
> it's a fairly good measure, though your point is well taken. Monopoly
> depends heavily on the dice roll. I'm not currently factoring in where
> players are situated on the board, nor am I factoring in how their
> opponent(s) are setup. So regardless of what they do, the next roll can
> change things significantly... they might lose with the next roll of the
> dice.
>
> Still, I have to begin somewhere.... and I believe this is a good place to
> start. Any ideas on how to do the data analysis.... or even a better
> overall approach?


Once you define the algorithm, it can be implemented. There are a
number of strategies, and various ways of determining outcomes.

You may be interested in:

<URL:http://hometown.aol.co.uk/monopolycheat/>


Is that what you have in mind?


--
Rob
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Monopoly 3 t.terrell Computer Support 12 10-12-2008 04:06 AM
Sydney School Teaches with Linux Monopoly Have A Nice Cup of Tea NZ Computing 2 03-21-2006 11:05 AM
Monopoly like game Nik Coughlin NZ Computing 0 01-11-2006 11:28 PM
Microsoft fails to have monopoly lawsuit dismissed TechNews Computer Support 13 06-16-2004 10:33 PM
MS EU Monopoly on Last Leg Buck Rogers NZ Computing 4 08-09-2003 12:16 PM



Advertisments