:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/HungryCat.e',284). % translate: unskipped File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e.lps :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(lps). % translate: begining File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e.lps % Fri, 09 Oct 2020 15:13:50 GMT File: (0x5625a9772600)%; %; Copyright (c) 2005 IBM Corporation and others. %; All rights reserved. This program and the accompanying materials %; are made available under the terms of the Common Public License v1.0 %; which accompanies this distribution, and is available at %; http://www.eclipse.org/legal/cpl-v10.html %; %; Contributors: %; IBM - Initial implementation %; %; @book{OrtonyCloreCollins:1988, %; author = "Andrew Ortony and Gerald L. Clore and Allan M. Collins", %; year = "1988", %; title = "The Cognitive Structure of Emotions", %; address = "Cambridge", %; publisher = "Cambridge University Press", %; } %; %; @book{Mueller:2006, %; author = "Erik T. Mueller", %; year = "2006", %; title = "Commonsense Reasoning", %; address = "San Francisco", %; publisher = "Morgan Kaufmann/Elsevier", %; } %; :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',28). % option modeldiff on :- if(is_e_toplevel). :- set_ec_option(modeldiff, on). :- endif. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',30). % load foundations/Root.e :- if(is_e_toplevel). :- load_e_cond('foundations/Root.e', changed). % load('/pack/logicmoo_ec/ext/ec_sources/foundations/Root.e',changed). :- endif. % load foundations/EC.e :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',30). :- if(is_e_toplevel). :- load_e_cond('foundations/EC.e', changed). % load('/pack/logicmoo_ec/ext/ec_sources/foundations/EC.e',changed). :- endif. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',33). % sort agent % From E: % % sort(agent). sort(agent). % sort aboutevent :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',33). % From E: % % sort(aboutevent). sort(aboutevent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',35). % sort desirability: integer % From E: % % subsort(desirability,integer). subsort(desirability,integer). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',37). % agent Kate, Lisa % From E: % % t(agent,kate). agent(kate). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',37). % From E: % % t(agent,lisa). agent(lisa). % aboutevent WinLotteryKate, WinLotteryLisa :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',37). % From E: % % t(aboutevent,winLotteryKate). aboutevent(winLotteryKate). % From E: % % t(aboutevent,winLotteryLisa). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',37). aboutevent(winLotteryLisa). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',40). % fluent Joy(agent,aboutevent) % From E: % % fluent( % joy(agent,aboutevent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',40). fluents([joy/2]). % From E: % % mpred_prop( % joy(agent,aboutevent), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',40). mpred_prop(joy(agent,aboutevent),fluent). % fluent Desirability(agent,agent,aboutevent,desirability) % From E: % % fluent( % desirability(agent,agent,aboutevent,desirability)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',40). fluents([desirability/4]). % From E: % % mpred_prop( % desirability(agent,agent,aboutevent,desirability), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',40). mpred_prop(desirability(agent,agent,aboutevent,desirability),fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',42). % fluent Believe(agent,aboutevent) % From E: % % fluent( % believe(agent,aboutevent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',42). fluents([believe/2]). % From E: % % mpred_prop( % believe(agent,aboutevent), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',42). mpred_prop(believe(agent,aboutevent),fluent). % fluent Like(agent,agent) % From E: % % fluent( % like(agent,agent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',42). fluents([like/2]). % From E: % % mpred_prop( % like(agent,agent), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',42). mpred_prop(like(agent,agent),fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',44). % fluent HappyFor(agent,agent,aboutevent) % From E: % % fluent( % happyFor(agent,agent,aboutevent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',44). fluents([happyFor/3]). % From E: % % mpred_prop( % happyFor(agent,agent,aboutevent), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',44). mpred_prop(happyFor(agent,agent,aboutevent),fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',46). % event WinLottery(agent) % From E: % % event( % winLottery(agent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',46). events([winLottery/1]). % From E: % % mpred_prop( % winLottery(agent), % event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',46). mpred_prop(winLottery(agent),event). % event AddJoy(agent,aboutevent) % From E: % % event( % addJoy(agent,aboutevent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',46). events([addJoy/2]). % From E: % % mpred_prop( % addJoy(agent,aboutevent), % event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',46). mpred_prop(addJoy(agent,aboutevent),event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',48). % event AddHappyFor(agent,agent,aboutevent) % From E: % % event( % addHappyFor(agent,agent,aboutevent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',48). events([addHappyFor/3]). % From E: % % mpred_prop( % addHappyFor(agent,agent,aboutevent), % event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',48). mpred_prop(addHappyFor(agent,agent,aboutevent),event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',50). %; Sigma % [agent,aboutevent,time] % Initiates(AddJoy(agent,aboutevent),Joy(agent,aboutevent),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',52). % From E: % % initiates( % addJoy(Agent,Aboutevent), % joy(Agent,Aboutevent), % Time). addJoy(Agent, Aboutevent)initiates joy(Agent, Aboutevent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',52). /* initiated(happens(addJoy(Agent,Aboutevent), Time_From, Time_Until), joy(Agent,Aboutevent), []). */ % "% =================================". % [agent1,agent2,aboutevent,time] % Initiates(AddHappyFor(agent1,agent2,aboutevent), % HappyFor(agent1,agent2,aboutevent), % time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',56). % From E: % % initiates( % addHappyFor(Agent1,Agent2,Aboutevent), % happyFor(Agent1,Agent2,Aboutevent), % Time). addHappyFor(Agent1, Agent2, Aboutevent)initiates happyFor(Agent1, Agent2, Aboutevent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',56). /* initiated(happens(addHappyFor(Agent1, Agent2, Aboutevent), Time_From, Time_Until), happyFor(Agent1,Agent2,Aboutevent), []). */ % "% =================================". % [agent1,agent2,aboutevent,time] % (agent1=Kate & aboutevent=WinLotteryKate) | % (agent1=Lisa & aboutevent=WinLotteryLisa) -> % Initiates(WinLottery(agent1),Believe(agent2,aboutevent),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',61). % From E: % % '->'( % ';'( % ','( % equals(Agent1,kate), % equals(Aboutevent,winLotteryKate)), % ','( % equals(Agent1,lisa), % equals(Aboutevent,winLotteryLisa))), % initiates( % winLottery(Agent1), % believe(Agent2,Aboutevent), % Time)). winLottery(Agent1)initiates believe(Agent2, Aboutevent)at Time if equals(Agent1, kate), equals(Aboutevent, winLotteryKate);equals(Agent1, lisa), equals(Aboutevent, winLotteryLisa). % initiated(happens(winLottery(Agent1), Time_From, Time_Until), at(believe(Agent2, Aboutevent), Time), [(equals(Agent1, kate), equals(Aboutevent, winLotteryKate);equals(Agent1, lisa), equals(Aboutevent, winLotteryLisa))]). % "% =================================". %; Delta % [agent,aboutevent,desirability,time] % !HoldsAt(Joy(agent,aboutevent),time) & % HoldsAt(Desirability(agent,agent,aboutevent,desirability),time) & % desirability=1 & % HoldsAt(Believe(agent,aboutevent),time) -> % Happens(AddJoy(agent,aboutevent),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',67). % From E: % % '->'( % ','( % holds_at( % not( % joy(Agent,Aboutevent)), % Time), % ','( % holds_at( % desirability(Agent,Agent,Aboutevent,Desirability), % Time), % ','( % equals(1,Desirability), % holds_at( % believe(Agent,Aboutevent), % Time)))), % addJoy(Agent,Aboutevent)). addJoy(Agent, Aboutevent)if not joy(Agent, Aboutevent)at Time, desirability(Agent, Agent, Aboutevent, Desirability)at Time, equals(1, Desirability), believe(Agent, Aboutevent)at Time. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',67). /* l_events(happens(addJoy(Agent,Aboutevent), Time, Time), [ holds(not(joy(Agent,Aboutevent)),Time), holds(desirability(Agent, Agent, Aboutevent, Desirability), Time), equals(1,Desirability), holds(believe(Agent,Aboutevent),Time) ]). */ % "% =================================". % [agent1,agent2,aboutevent,desirability1,desirability2,time] % !HoldsAt(HappyFor(agent1,agent2,aboutevent),time) & % HoldsAt(Desirability(agent1,agent2,aboutevent,desirability1),time) & % desirability1=1 & % HoldsAt(Desirability(agent1,agent1,aboutevent,desirability2),time) & % desirability2=1 & % HoldsAt(Like(agent1,agent2),time) & % HoldsAt(Believe(agent1,aboutevent),time) & % agent1 != agent2 -> % Happens(AddHappyFor(agent1,agent2,aboutevent),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',75). % From E: % % '->'( % ','( % holds_at( % not( % happyFor(Agent1,Agent2,Aboutevent)), % Time), % ','( % holds_at( % desirability(Agent1,Agent2,Aboutevent,Desirability1), % Time), % ','( % equals(1,Desirability1), % ','( % holds_at( % desirability(Agent1,Agent1,Aboutevent,Desirability2), % Time), % ','( % equals(1,Desirability2), % ','( % holds_at( % like(Agent1,Agent2), % Time), % ','( % holds_at( % believe(Agent1,Aboutevent), % Time), % diff(Agent1,Agent2)))))))), % addHappyFor(Agent1,Agent2,Aboutevent)). addHappyFor(Agent1, Agent2, Aboutevent)if not happyFor(Agent1, Agent2, Aboutevent)at Time, desirability(Agent1, Agent2, Aboutevent, Desirability1)at Time, equals(1, Desirability1), desirability(Agent1, Agent1, Aboutevent, Desirability2)at Time, equals(1, Desirability2), like(Agent1, Agent2)at Time, believe(Agent1, Aboutevent)at Time, diff(Agent1, Agent2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',75). /* l_events(happens(addHappyFor(Agent1, Agent2, Aboutevent), Time, Time_Until), [ holds(not(happyFor(Agent1, Agent2, Aboutevent)), Time), holds(desirability(Agent1, Agent2, Aboutevent, Desirability1), Time), equals(1,Desirability1), holds(desirability(Agent1, Agent1, Aboutevent, Desirability2), Time), equals(1,Desirability2), holds(like(Agent1,Agent2),Time), holds(believe(Agent1,Aboutevent),Time), diff(Agent1,Agent2) ]). */ % "% =================================". % Happens(WinLottery(Kate),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',84). % From E: % % happens( % winLottery(kate), % t+0). observe winLottery(kate)at t+0. % observe([winLottery(kate)],t+0). % "% =================================". %; Psi % [agent1,agent2,aboutevent,desirability1,desirability2,time] % HoldsAt(Desirability(agent1,agent2,aboutevent,desirability1),time) & % HoldsAt(Desirability(agent1,agent2,aboutevent,desirability2),time) -> % desirability1 = desirability2. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',89). % From E: % % '->'( % ','( % holds_at( % desirability(Agent1,Agent2,Aboutevent,Desirability1), % Time), % holds_at( % desirability(Agent1,Agent2,Aboutevent,Desirability2), % Time)), % equals(Desirability1,Desirability2)). if desirability(Agent1, Agent2, Aboutevent, Desirability1)at Time, desirability(Agent1, Agent2, Aboutevent, Desirability2)at Time then equals(Desirability1, Desirability2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',89). /* reactive_rule([ holds(desirability(Agent1, Agent2, Aboutevent, Desirability1), Time), holds(desirability(Agent1, Agent2, Aboutevent, Desirability2), Time) ], [equals(Desirability1,Desirability2)]). */ % "% =================================". %; Gamma % [agent,aboutevent] % !HoldsAt(Joy(agent,aboutevent),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',96). % From E: % % initially( % neg( % joy(Agent,Aboutevent))). initially not joy(Agent, Aboutevent). % initial_state([not(joy(Agent,Aboutevent))]). % "% =================================". % [agent1,agent2,aboutevent] % !HoldsAt(HappyFor(agent1,agent2,aboutevent),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',96). % From E: % % initially( % neg( % happyFor(Agent1,Agent2,Aboutevent))). initially not happyFor(Agent1, Agent2, Aboutevent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',96). /* initial_state([ not(happyFor(Agent1, Agent2, Aboutevent)) ]). */ % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',98). % [aboutevent] % !HoldsAt(Believe(Kate,aboutevent),0). % From E: % % initially( % neg( % believe(kate,Aboutevent))). initially not believe(kate, Aboutevent). % initial_state([not(believe(kate,Aboutevent))]). % "% =================================". % [aboutevent] % !HoldsAt(Believe(Lisa,aboutevent),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',98). % From E: % % initially( % neg( % believe(lisa,Aboutevent))). initially not believe(lisa, Aboutevent). % initial_state([not(believe(lisa,Aboutevent))]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',100). % [agent1,agent2,time] % HoldsAt(Like(agent1,agent2),time). % From E: % % holds_at( % like(Agent1,Agent2), % Time). like(Agent1, Agent2)at Time. % l_int(holds(like(Agent1,Agent2),Time),[]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',102). % [time] % HoldsAt(Desirability(Lisa,Kate,WinLotteryKate,1),time). % From E: % % holds_at( % desirability(lisa,kate,winLotteryKate,1), % Time). desirability(lisa, kate, winLotteryKate, 1)at Time. % l_int(holds(desirability(lisa,kate,winLotteryKate,1),Time),[]). % "% =================================". % [time] % HoldsAt(Desirability(Kate,Kate,WinLotteryKate,1),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',102). % From E: % % holds_at( % desirability(kate,kate,winLotteryKate,1), % Time). desirability(kate, kate, winLotteryKate, 1)at Time. % l_int(holds(desirability(kate,kate,winLotteryKate,1),Time),[]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',104). % [time] % HoldsAt(Desirability(Lisa,Lisa,WinLotteryKate,1),time). % From E: % % holds_at( % desirability(lisa,lisa,winLotteryKate,1), % Time). desirability(lisa, lisa, winLotteryKate, 1)at Time. % l_int(holds(desirability(lisa,lisa,winLotteryKate,1),Time),[]). % "% =================================". % [time] % HoldsAt(Desirability(Kate,Kate,WinLotteryLisa,0),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',104). % From E: % % holds_at( % desirability(kate,kate,winLotteryLisa,0), % Time). desirability(kate, kate, winLotteryLisa, 0)at Time. % l_int(holds(desirability(kate,kate,winLotteryLisa,0),Time),[]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',106). % [time] % HoldsAt(Desirability(Kate,Lisa,WinLotteryLisa,0),time). % From E: % % holds_at( % desirability(kate,lisa,winLotteryLisa,0), % Time). desirability(kate, lisa, winLotteryLisa, 0)at Time. % l_int(holds(desirability(kate,lisa,winLotteryLisa,0),Time),[]). % "% =================================". % [time] % HoldsAt(Desirability(Kate,Kate,WinLotteryLisa,0),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',106). % From E: % % holds_at( % desirability(kate,kate,winLotteryLisa,0), % Time). desirability(kate, kate, winLotteryLisa, 0)at Time. % l_int(holds(desirability(kate,kate,winLotteryLisa,0),Time),[]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',108). % [time] % HoldsAt(Desirability(Kate,Lisa,WinLotteryKate,0),time). % From E: % % holds_at( % desirability(kate,lisa,winLotteryKate,0), % Time). desirability(kate, lisa, winLotteryKate, 0)at Time. % l_int(holds(desirability(kate,lisa,winLotteryKate,0),Time),[]). % "% =================================". % [time] % HoldsAt(Desirability(Lisa,Lisa,WinLotteryLisa,0),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',108). % From E: % % holds_at( % desirability(lisa,lisa,winLotteryLisa,0), % Time). desirability(lisa, lisa, winLotteryLisa, 0)at Time. % l_int(holds(desirability(lisa,lisa,winLotteryLisa,0),Time),[]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',110). % [time] % HoldsAt(Desirability(Lisa,Kate,WinLotteryLisa,1),time). % From E: % % holds_at( % desirability(lisa,kate,winLotteryLisa,1), % Time). desirability(lisa, kate, winLotteryLisa, 1)at Time. % l_int(holds(desirability(lisa,kate,winLotteryLisa,1),Time),[]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',112). % completion Happens % From E: % % completion(happens). completion(happens). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',114). % range time 0 3 % From E: % % range(time,0,3). range(time,0,3). % range desirability -1 1 :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',114). % From E: % % range(desirability,-1,1). range(desirability,-1,1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e',116). % range offset 1 1 % From E: % % range(offset,1,1). range(offset,1,1). %; End of file. % translate: ending File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter11/Lottery.e.lps