Dynamic weights finally working. Also fixed a bug in the JS
Fixed bug in "avoidWon" predicate (must fix fieldState)