Extend Simulation For Convergence #30
-
I have a simple
and when I do:
I see:
What should/could I do to extend the simulations to hopefully reach convergence? I've tried playing around with variables such as Update Doing |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
0 | 0 | 0 | 1 |
0 | 0 | 1 | -1 |
0 | 1 | 0 | 1 |
0 | 1 | 1 | 1 |
1 | 0 | 0 | 1 |
1 | 0 | 1 | 0 |
1 | 1 | 0 | 0 |
1 | 1 | 1 | 1 |
As you can see, 5 binary vectors out of 8 achieve the maximal value: the energy level of the ground states is highly degenerate. Hence the agents have no incentive to prefer one ground state over another which explains the warning about the convergence.
However, by printing the energy levels of the agents you can see that they all converge quickly in terms of energy level. This means than the agents easily reach the solution space, but they do not stay close to a given solution, instead they alternate between solutions.
Currently, the convergence is checked using the state of the agents which is an issue when the energy level of the ground state is highly degenerate as in this case. I am discussing with @bqth29 and @lorpugliese the implementation of a convergence criterion based on the energy levels.
Note that there is only one solution to the minimization of sb.minimize
instead of sb.maximize
all the agents do converge quickly.
General remarks about the stopping window
The stopping window is something we introduced to allow for early stopping, Goto et al.'s paper uses only max_steps
(also we recently implemented a timeout functionality, it will be added in the next release). There are no theoretical guarantees about actually achieving this convergence criterion.
Doing
sb.set_env(time_step=0.001)
allowed things to converge but I'm hoping that there may be other options that I could play with.
I believe that drastically reducing time_step
like that without increasingsampling_period
or convergence_threshold
can lead to false positives: the states at step
, step + sampling_period
, step + 2 * sampling_period
, ..., are more likely to be equal because they correspond to instants closer in time, not because the agents did converge.
Also as I mentionned above, the stopping window is currently based on the state of the agents whereas it may be more relevant to base it on their energy.
Thank you for showing us this example, this is a case we overlooked and it will help us improve the package! 😃
Beta Was this translation helpful? Give feedback.
Short version
There are many solutions which achieve the maximal value. Eventhough the agents have no trouble reaching and staying in the solution space, the agents have trouble staying close to the same solution long enough for the convergence criterion to be met.
Long version
Let$a$ , $b$ , $c$ , $d$ be four binary variables (that is variables in $\set{0, 1}$ ). Let $x = (a ~ b ~ c ~ d)^T$ and $y = (b ~ c ~ d)^T$ . Define the following two matrices.
Matri…