Math Is Fun Forum

  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2011-04-27 16:31:54

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Chance Simulator

This is very much Draft (Beta or perhaps even Delta!) software, but thought you guys might like to take a look:

Chance Simulator

Move boxes by dragging their "titles".

You connect the boxes (drag-drop from central area) and press "Once" for one calc, or "Play" for lots.

Many boxes (like "Number") total up their inputs.

It is supposed to be up to your imagination how you use it. And it is supposed to be fun.

I have got it to calculate Phi by a loop, and to simulate probabilities of two dice. Hopefully we can get it to do lots more (I have plans for a Pie Graph, an XY-Graph and basic functions, can you imagine feeding different functions to each axis?)

Request features, but allow me plenty of time to implement smile


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#2 2011-04-27 17:03:45

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Chance Simulator

Hi MIF;

I could not get it to do anything. I am doing something wrong. Could you provide an example?


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#3 2011-04-27 17:48:05

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Chance Simulator

I have just now put some examples on the page. Here is one:


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#4 2011-04-27 19:11:42

bobbym
bumpkin
From: Bumpkinland
Registered: 2009-04-12
Posts: 109,606

Re: Chance Simulator

Hi MIF;

I have to say it took me a long time to repeat your example. Then I took a B complex 100 mg, which doubled my intellectual capacity. Got it right away after that.

Needs more examples. Looks like a really good idea. Continue developing it.


In mathematics, you don't understand things. You just get used to them.
If it ain't broke, fix it until it is.
Always satisfy the Prime Directive of getting the right answer above all else.

Offline

#5 2011-05-04 05:57:56

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

I can't get my bar boxes to turn into lines connecting
the other boxes, but I sure figured out how to get
a lot of boxes of different types.


igloo myrtilles fourmis

Offline

#6 2011-05-04 15:47:56

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Chance Simulator

Great! If you find something interesting you can now post your model by clicking on the "share" button (not fully functional yet, but getting there).

For example: http://www.mathsisfun.com/data/chance-s … _0_2~C_2_1


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#7 2011-05-17 05:26:09

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Here's one I made similar to yours!!
The numbers list under the bar can't
ofcourse go all the way to 60 because
the computer screen is not wide
enough, but it still works though for
as much as it can show.
http://www.mathsisfun.com/data/chance-s … _1_2~C_2_3


igloo myrtilles fourmis

Offline

#8 2011-05-17 05:28:04

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Woops, the model shown doesn't go to 60, just 6.
Well I guess you're not supposed to change the value of the chance thingy.


igloo myrtilles fourmis

Offline

#9 2011-05-17 05:32:30

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Here's another one that count up the sixes too!!
http://www.mathsisfun.com/data/chance-s … _3_4~C_4_5


igloo myrtilles fourmis

Offline

#10 2011-05-17 05:33:43

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Woops, my logic =1 and sofar boxes didn't show up!!  Maybe I didn't copy and
paste the whole thing? or a bug?


igloo myrtilles fourmis

Offline

#11 2011-05-17 14:48:45

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Chance Simulator

Hi John,

Thanks for having a go at it ... yes it is a bug, or more precisely a feature I have not fully implemented. I will work on it, and get back to you.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#12 2011-05-17 18:47:31

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Chance Simulator

Fixed! Thanks John, I can now see what you did.

I am currently grappling with how to make it do things like "draw numbers from a bag". I am trying to have a "bucket" that things could be put into or taken out of, but it isn't really working.

It would also be nice to have "queues", so we could simulate people waiting in line at the supermarket etc. Once again I can't make it work properly.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#13 2011-05-18 13:02:38

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Awesome, thanks for fixing it!  I'll come back to this somemore and build some more things soon...


igloo myrtilles fourmis

Offline

#14 2011-05-18 13:45:15

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Here's something you might enjoy!!!!
http://www.mathsisfun.com/data/chance-s … 15~C_15_14


igloo myrtilles fourmis

Offline

#15 2011-05-18 13:48:01

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

There is a tiny bug you can easily fix.
My lower left number button should start
with a one in it, not a zero, then it will
compute a well known special number!!!!!


igloo myrtilles fourmis

Offline

#16 2011-05-18 13:54:59

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Here's a picture of
what happens when
you hit reset button and
then type a "1" into
the lower left button and
"play" it for a few
seconds.


igloo myrtilles fourmis

Offline

#17 2011-05-18 16:27:58

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

What is this bucket anyway? 
It seems to drop to the bottom bucket, sort of
slipping past the top bucket.
http://www.mathsisfun.com/data/chance-s … _0_1~C_3_0


igloo myrtilles fourmis

Offline

#18 2011-05-18 16:30:51

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Hmmm, very interesting, I would have thought the bottom bucket would have
kept the 33, but it went to the list silently...
http://www.mathsisfun.com/data/chance-s … _3_0~C_1_4


igloo myrtilles fourmis

Offline

#19 2011-05-18 18:11:19

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Chance Simulator

Wow, that is amazing. Setting start values inside circular loops is hard ... any ideas?


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#20 2011-05-19 01:37:18

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

The only thing that comes to my historical mind when I programmed in C, was the "static" type of number, such as a static long int, a static unsigned int, etc.  I think "static" let you set the initial value in the declarations before runtime.   But I really have no idea about Java code.  Maybe someday I'll explore it, but I don't think I have the memory to take it all in.


igloo myrtilles fourmis

Offline

#21 2011-05-19 08:08:45

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Another thought that came to mind, is to have another box called "startup value" or something like "commencement value" or something better, I don't know what to call it.  But you could hook that box up to the circular loop or to whatever you want, and it would link up only on the zeroth time, actually before runtime, or just at runtime before "once" is executed, the zeroth value would jump into place and the arrow link would then disappear or not happen anymore after that.   But what to call it is the hard part so it is intuitive.  "jump start value" ??


igloo myrtilles fourmis

Offline

#22 2011-05-19 09:43:17

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Chance Simulator

A "Once Only" box!

I have been thinking of ways to alter the "connections" ... what if a connection could "pull" a value. In other words it gets taken away from the box the line comes FROM.

And we could have a Queue box where the values get pushed in from the left and pulled off from the right.

So we could set up a Queue box with "-1,1" in it, and then *pull* the "1" off the Queue (leaving "-1") and send it to a Number box. And the Number box could then send it back to the Queue, making the Queue "1,-1". Round and round.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#23 2011-05-19 10:40:39

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Absolutely awesome!!!!  Go for it!!


igloo myrtilles fourmis

Offline

#24 2011-05-21 10:44:40

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,711

Re: Chance Simulator

Am making some progress, but the order of calculations is posing problems ... it sometimes does things in what seem to be the "wrong" order, even though it is being very sensible. I have some ideas to work on, will let you know how I go.


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#25 2011-05-22 04:46:45

John E. Franklin
Member
Registered: 2005-08-29
Posts: 3,588

Re: Chance Simulator

Take your time, I've been sleeping off a bad cold for 2 days...  Sorry it is harder than expected.
Is it the queue that's hard or the one-shot "once only".  Are you experiencing race states???
Do you need timing control to slow it down, so it doesn't run wild?


igloo myrtilles fourmis

Offline

Board footer

Powered by FluxBB