Question on the remote coin flipping problem
Is the definition of 'box' i gave wrong? What is the correct definition?


It is incorrect.

The analogous description of a commitment scheme would be that it is a box that contains only one choice (for example, "heads" or "tails"), Alice can place either, and Bob can't tell (by looking at the box) which is in it.

Later, Alice can open the box; Bob can then tell what's in it and (here's the key point) Alice can't change her mind what's in the box.

With this definition, this is a secure coin flip protocol (except that when Alice learns Bob's choice, she can walk away without opening the box; that needs to be handled somehow).

The easiest way to implement a commitment scheme is with a cryptographical hash function; Alice picks the secret value she's putting into the commitment and a long random nonce, she hashes them both together:

$$Commitment = Hash( Secret || Nonce )$$

She then sends the hash to Bob.  Bob, by looking at the hash, can't recover the commitment (because of the random nonce).  Then, Alice opens the commitment by revealing the secret and the nonce; Bob verifies the secret by hashing the revealed secret and nonce together to recompute the original commitment.  If the Hash used is collision resistant (that is, we can't find two distinct values that hash to the same value), then Alice can't have a single commitment that can open to two different value (because that would imply two different $Secret || Nonce$ values that hash to the same thing, and we assume Alice can't find such a pair).