sanjaythomas / monopoly Goto Github PK
View Code? Open in Web Editor NEWTeam 007's Adjudicator Implementation for CSE 519 Data Science Fundamentals
Team 007's Adjudicator Implementation for CSE 519 Data Science Fundamentals
UnicodeEncodeError: 'ascii' codec can't encode character '\u2013' in position 54: ordinal not in range(128)
I am facing this in a python 3.6.4 environment on Mac
In dice.py, you use numpy to roll the dice like so:
roll = np.random.choice(np.arange(1, 7), 2)
This causes a number of problems. For example, the player money can change type from int to numpy.int32 (since the roll is used to calculate utility payment), which causes a comparison like money > 0
to return a numpy.bool, which causes the return value of buyProperty (for example) to no longer be of type bool, which makes it default to False (which had me questioning my sanity). You could replace the line with:
roll = [random.randint(1, 6), random.randint(0, 6)]
to solve these issues.
In the spec, it says an erroneous bid should be treated as 0.
Logically speaking, debt would need to be something that player cant avoid. So, iam not sure passing value of property as debt is the best solution. User can anyways know cost of property from static data.
The "extra phase information" during the call to buyProperty on the agent contains a tuple of the form (propertyNumber, ) rather than just the property number.
When player 2 lands on a space and doesn't have enough money to pay its debt, it wins the game. I suspect this is due to the following code in adjudicator.py:
if not result[0]:
winner = opponent.id
break
elif not result[1]:
winner = currentPlayer.id
break
Since the handle_payment method returns the same thing no matter whose turn it is, this produces the incorrect result.
Whenever Trades are proposed, the additional information field is supposed to have 5 elements i.e
True/False, Cash offered, Properties offered, Cash Requested, Properties requested.
But below are the issues found in it:
Agent 1 : the STATE passed to 'RespondTrade' function does not contain the 'True/False' value, it just has the other 4 elements
example - (75, [], 0, [12])
Agent 2 : 'RespondTrade' is called twice by the adjudicator and in the 1st call 'True/False' is not present but in the 2nd call, all 5 elements are present.
example - (75, [], 0, [12])
, (False, 75, [], 0, [12])
hi could you please tell me if there is any environment requirements for the adjudicator.
I was facing this issue in windows environment looks like signals are not supported in windows environment.
Traceback (most recent call last):
File "testcases.py", line 1535, in
test(adjudicator)
File "testcases.py", line 101, in testcase_auction
[winner,final_state] = adjudicator.runGame(agentOne,agentTwo,[[3,5]],None,None)
File "D:\final sem\dsf\dsf_project\dsf-project\adjudicator.py", line 1356, in runGame
self.conductBSTM(self.state)
File "D:\final sem\dsf\dsf_project\dsf-project\adjudicator.py", line 534, in conductBSTM
bstmActionAgentOne = self.runPlayerOnStateWithTimeout(self.agentOne,state)
File "C:\Users\MOHANGANDHI\AppData\Local\Programs\Python\Python37-32\lib\site-packages\timeout_decorator\timeout_decorator.py", line 78, in new_function
old = signal.signal(signal.SIGALRM, handler)
AttributeError: module 'signal' has no attribute 'SIGALRM'
monopoly.log
Check 5 turns before game ended.
Line 28 in b46a0c6
we were trying to understand double_counter logic.It looks like double_counter is not reset to zero and so non consecutive doubles are also getting tracked.Are we missing something?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.