private static void Main(string[] args) { var env = new ConcurrentEnvironment(); var agent1 = new BargainingAgent(); env.Add(agent1, "agent1"); var agent2 = new BargainingAgent(); env.Add(agent2, "agent2"); agent2.Start(); Thread.Sleep(100); agent1.Start(); env.WaitAll(); }
private static void Main(string[] args) { var env = new EnvironmentMas(randomOrder: false, parallel: false); var agent1 = new BargainingAgent(); env.Add(agent1, "agent1"); var agent2 = new BargainingAgent(); env.Add(agent2, "agent2"); env.Memory["Eps"] = 0.1; env.Memory["Utility1"] = (Func <double, double>)((double deal) => 5.0 - deal); env.Memory["Utility2"] = (Func <double, double>)((double deal) => 2.0 / 3.0 * deal); env.Start(); }
private static void Main(string[] args) { var env = new TurnBasedEnvironment(); var agent1 = new BargainingAgent(); env.Add(agent1, "agent1"); var agent2 = new BargainingAgent(); env.Add(agent2, "agent2"); env.Memory["Eps"] = 0.1; env.Memory["Utility1"] = (Func <double, double>)((double deal) => 5.0 - deal); env.Memory["Utility2"] = (Func <double, double>)((double deal) => 2.0 / 3.0 * deal); env.Start(); }