/*
 * Created on Apr 4, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package ps6.v2;

import ps6.Message;

/**
 * @author knorton
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class p1 {
	public static void main(String[] args) {
		Graph		g = new Graph();
		
		Evidence 	e = new Evidence(new Message(0.9,0.1));
		Inverter 	i = new Inverter();
		i.damp();
		SoftEquals	q = new SoftEquals();
		
		g.addGate(e);
		g.addGate(i);
		g.addGate(q);
		
		Connector c = new Connector("X",q,i);
		c.probe();
		g.addConnector(c);
		
		c = new Connector("X'",q,i);
		//c.probe();
		g.addConnector(c);
		
		c = new Connector("Y",q,e);
		//c.probe();
		g.addConnector(c);
		
		for (int j=0;j<100;j++)
			g.step();
	}
}
