EssexUniversityMCTS / gvgai

This is the framework for the General Video Game Competition - http://www.gvgai.net/
Other
140 stars 69 forks source link

Problem with values in SerializableStateObservation in Python client #93

Closed ercumentilhan closed 7 years ago

ercumentilhan commented 7 years ago

I run several tests under Windows 10 (using Python 2.7) and Ubuntu 16.04 (using Python 2.7 and 3.5), and encountered a problem where I always obtain duplicated/wrong objects within NPCPositions and similar fields of SerializableStateObservation objects in the Python client.

For example, in an intermediate state of the Aliens game, I examine NPCPositions (with 5 aliens in it let's say) by iterating through it as sso.NPCPositions[0][0,...,4] and all of the elements have the same values filled in their fields (position, sqDist, category(which is wrong even), ...).

I have gone through the whole communication process to see if there is something wrong and I am stuck in the part where the JSON string from the server is handled and mapped into SerializableStateObservation objects incorrectly.

However, I am not sure if I am doing something wrong here. Upon your confirmation on the existence of this problem I can provide more information. If it is a problem on my side, I will appreciate any sorts of helpful responses.

ljialin commented 7 years ago

Hi, This is indeed a bug of the deserialisation in python. Now fixed. Please pull. Thank you!