import sys
import os
from copy import *
from types import *
from random import *
import Genome
import History

if len(sys.argv) != 4:
  print "Usage: python oe.py [strom] [genomy v listoch] [historia]"
  sys.exit(1)

tree = sys.argv[1]
leaves = sys.argv[2]
hist = sys.argv[3]

History.init (tree)
h = History.History(leaves)
h.read(hist)
h.fill_in_oe(0)
h.opt_neigh()
h.fill_in_oe(1)
h.opt_neigh()
print h.score()
print h
