Jump to content

Recommended Posts

Posted

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?

Posted
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.

Posted (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 by Growl
Posted

What if "dead" was actually alive, and "alive" was actually dead?

You know, as long as this is in "Sculptures made of Almonds"...

Posted
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.

Posted
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.

Posted
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?

Posted
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.

Posted
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.

Posted
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.

Posted
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.

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.