Load the compiled staff solution.
from hw3a import *
Make some agents.
james = agent('James Bond')
joe = agent('Joe Biden')
james
joe
str(james)
str(joe)
james.add_friend(joe)
james2 = james.copy()
james2.pp()
print(james2.pp())
print(joe.pp())
james == james2
james == joe
Create some stances.
s1 = stance('gun control')
s2 = stance('abortion', 'pro', 'b')
s1
s2
str(s1)
str(s2)
s1.issue
str(s1.issue)
issue.issues
issue.issues['ABORTION']
joe.add_goal(s1)
joe.add_goal(s2)
james.add_goal(s1)
james.add_goal(s2)
print(joe.pp())
print(james.pp())
mary = agent('Mary')
s3 = stance('abortion', 'con', 'a')
s4 = stance('gun control', 'con', 'b')
mary.add_goal(s3)
mary.add_goal(s4)
print (mary.pp())
mary.agreewith(joe)
mary.add_friend(joe)
mary.adopt_goals()
mary.agreewith(joe)
joe.agreewith(james)
joe.disagreewith(james)
joe.disagreewith(mary)
james.disagreewith(mary)
joe.agreewith(mary)
joe.agreewith(joe)
mary.agreewith(mary)
mary.disagreewith(mary)
a1 = agent('Arthur')
type(a1)
a1.count
agent.count
a1 in agent.agents
agent.agents
a1.name
a1.friends
a1.goals
a1.adoptedgoals
repr(a1)
str(a1)
a1.pp()
print(a1.pp())
a2 = agent('Judy')
a2
str(a2)
a2.name
type(a2)
a2 in agent.agents
a2.count
agent.count
a1 in a2.friends
a2 in a1.friends
a1.add_friend(a2)
a1 in a2.friends
a2 in a1.friends
a2.pp()
print(a2.pp())
b1 = stance('gun control')
b1.issue
b1
str(b1)
b1.side
b1.importance
type(b1)
type(b1) == stance
b1.count
stance.count
b1 in stance.stances
stance.stances
b2 = b1.copy()
b1 == b2
b3 = stance('gun control', 'con', 'b')
b3
str(b3)
b1 == b3
b1 != b3
a1.add_goal(b1)
b4 = stance('bill of rights')
b5 = stance('public health')
b6 = stance('SCOTUS appointments')
a1.add_goal(b4)
a2.add_goal(b5)
a2.add_goal(b6)
b4 in a1.goals
b5 in a1.goals
b5 in a2.goals
b6 in a2.goals
a1.agreewith(a1)
a1.agreewith(a2)
a1.disagreewith(a2)
a1.disagreewith(a1)
a3 = agent('Tom')
c1 = stance ('gun control', 'con', 'b')
c1
a3.add_goal(c1)
a1.add_friend(a3)
a1.adopt_goals()
a1.adoptedgoals
a1.disagreewith(a1)
a3.agreewith(a1)