Growl Posted January 26 Posted January 26 You are playing a video game, you have received a "gift" box, it could contain one of many items... has the box contents been determined as it was presented or will the contents be determined as you open it? Is the box empty or does it already contain a gift?
Bufofrog Posted January 26 Posted January 26 22 minutes ago, Growl said: You are playing a video game, you have received a "gift" box, it could contain one of many items... has the box contents been determined as it was presented or will the contents be determined as you open it? It depends on how the code is written.
Growl Posted January 26 Author Posted January 26 (edited) And only God knows if the cat is dead or alive. Truth be known, the fate of the entire universe is predetermined, the coding of physics. Edited January 26 by Growl -1
joigus Posted January 26 Posted January 26 What if "dead" was actually alive, and "alive" was actually dead? You know, as long as this is in "Sculptures made of Almonds"...
swansont Posted January 26 Posted January 26 6 minutes ago, joigus said: You know, as long as this is in "Sculptures made of Almonds"... ! Moderator Note Yeah, no idea why. Moved, since this seems like a Schrödinger’s cat question. 19 minutes ago, Growl said: And only God knows if the cat is dead or alive. Truth be known, the fate of the entire universe is predetermined, the coding of physics. No, that’s not consistent with what we know. The contents of the box is likely a classical situation, not a quantum superposition, so the contents would be determined when the items were placed in the box.
Growl Posted January 26 Author Posted January 26 12 minutes ago, swansont said: ! Moderator Note Yeah, no idea why. Moved, since this seems like a Schrödinger’s cat question. No, that’s not consistent with what we know. The contents of the box is likely a classical situation, not a quantum superposition, so the contents would be determined when the items were placed in the box. But were the items placed in the box when presented or when opened? Not really a question, just an observation of how things work in cyberspace v the physical universe. I thought it an interesting diddy.
Sensei Posted January 26 Posted January 26 1 hour ago, Growl said: You are playing a video game, you have received a "gift" box, it could contain one of many items... has the box contents been determined as it was presented or will the contents be determined as you open it? Is the box empty or does it already contain a gift? Suppose so we have a Java (e.g. Android mobile game) code with a base class Item and a set of items: public class Item { public String what; public Item( String what ) { this.what = what; } } public class Key extends Item { public Key() { super( "key" ); } } public class Cat extends Item { public Cat() { super( "cat" ); } } public class DeadCat extends Item { public DeadCat() { super( "deadcat" ); } } If the Box code is: public class Box extends Item { public Box() { super( "box" ); } public Item open() { List<Item> items = new ArrayList(); items.add( new Key() ); items.add( new Cat() ); items.add( new DeadCat() ); Random random = new Random(); random.setSeed( System.currentTimeMillis() ); return( items.get( random.nextInt( items.size() ) ) ); } } What the player gets is drawn at random when the box is opened. setSeed() is set to current date and time in milliseconds. The moment of opening the box by player causes "collapse". The game superadmin/admin could not check in advance what players will receive. In has the advantage of not taking up memory to store the hidden element. But if the code is: public class Box extends Item { private Item hidden_item; public Box() { super( "box" ); List<Item> items = new ArrayList(); items.add( new Key() ); items.add( new Cat() ); items.add( new DeadCat() ); Random random = new Random(); random.setSeed( System.currentTimeMillis() ); hidden_item = items.get( random.nextInt( items.size() ) ); } public Item open() { return( hidden_item ); } } The hidden contents of the box are fairly well known to the computer from the moment the box is created, but are not revealed until the player opens the box. The game superadmin/admin can check in advance what players will receive. But if the code is: public class Box extends Item { private static final Random = new Random(); private Item hidden_item; public Box() { super( "box" ); List<Item> items = new ArrayList(); items.add( new Key() ); items.add( new Cat() ); items.add( new DeadCat() ); hidden_item = items.get( random.nextInt( items.size() ) ); } public Item open() { return( hidden_item ); } } The order of hidden objects is not only known, but always the same, regardless of time. 2 hours ago, Growl said: And only God knows if the cat is dead or alive. "superadmin" knows what the box contains only if its contents were generated when the box was created. Quote Is the box empty or does it already contain a gift? The advantage of leaving it "empty" is less memory consumption. 1 hour ago, Growl said: But were the items placed in the box when presented or when opened? In the physical world, objects are made up of atoms that can be assigned unique identifiers (mass behavior, quantum number behavior, etc.), So what's in the box is defined from the BB. The rock on the moon may have been there for billions of years. Or maybe it was generated when the astronaut arrived on the Moon?
swansont Posted January 26 Posted January 26 2 hours ago, Growl said: But were the items placed in the box when presented or when opened? If they are in the box when opened, they were placed there before.
Growl Posted January 27 Author Posted January 27 15 hours ago, swansont said: If they are in the box when opened, they were placed there before. Not in cyberspace, the action of opening the box can trigger the creation of the gift.
swansont Posted January 27 Posted January 27 47 minutes ago, Growl said: Not in cyberspace, the action of opening the box can trigger the creation of the gift. If you invoke magic (or any other unphysical phenomenon) then you can make up any rules you want.
Sensei Posted January 27 Posted January 27 53 minutes ago, Growl said: Not in cyberspace, the action of opening the box can trigger the creation of the gift. Didn't I provide counter-examples to this 16 hours ago.. ? Fix to the previous source code example. It should be: But if the code is: public class Box extends Item { private static final Random random = new Random(); static { random.setSeed( 0 ); } private Item hidden_item; public Box() { super( "box" ); List<Item> items = new ArrayList(); items.add( new Key() ); items.add( new Cat() ); items.add( new DeadCat() ); hidden_item = items.get( random.nextInt( items.size() ) ); } public Item open() { return( hidden_item ); } } The order of hidden objects is not only known, but always the same, regardless of time.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now