swoodhouse / Game

Other
1 stars 0 forks source link

Implement working treatment/mutation transfer tests #21

Open swoodhouse opened 4 years ago

swoodhouse commented 4 years ago

Current tests fail but I'm pretty sure it's because the tests are wrong, not the implementation.

swoodhouse commented 4 years ago
testTreatmentTransfer(treated, untreated, i):
  // test1
  exist(treated, treatmentVars) ==
  exist(untreated, chosenTreats[i])

  // test2
  transfer = for v in oe/kovars conj logicalequivalence(repTreat v, repchosentreat i j)

  (treated * transfer) == (exist(untreated, treatmentVars) * transfer)

testMutationTransfer(mutated, unmutated, i):
  // test1
  exist(mutated, mutationVars[i]) ==
  exist(unmutated, chosenMuts[i])

  // test2..
  transfer = for v in oe/kovars conj logicalequivalence(repMut i v, repchosenmut i v)

  (mutated * transfer) == (exist(unmutated, mutationVars[i]) * transfer)