squillero / computational-intelligence Goto Github PK
View Code? Open in Web Editor NEWSpare material for Computational Intelligence 01URROV @ Politecnico di Torino
License: Other
Spare material for Computational Intelligence 01URROV @ Politecnico di Torino
License: Other
In the commit a293bfe the function takeCard was removed, this causes the server to crash on start of the game
By using os._exit() for termination of the server.py script all possibilities for a multithreaded approach are discarded as it closes also all calling threads that could be used for a tournament style environment
When using automated clients it's not possible to check for the number of connected players without sending a ClientPlayerStartRequest, this means that without arbitrary delays there cannot be synchronization between clients to determine the correct number of players.
I tried to change current implementation of the function used to solve the set covering problem because it usually looped for a long time and didn't give any result in the end. I tried to check for a pull request but probably a new branch is needed and I can't create it.
My implementation of the fifth cell of set-covering.ipynb file was the following:
frontier = PriorityQueue()
state = State(set(), set(range(NUM_SETS)))
frontier.put((0, state)) # added sample tuple so that won't loop
counter = 0
_, current_state = frontier.get()
while not goal_check(current_state):
counter += 1
for action in current_state.not_taken: # used not_taken instead of [1]
new_taken = current_state.taken | {action} # used | instead of ^
new_not_taken = current_state.not_taken - {action} # used - instead of ^
new_state = State(new_taken, new_not_taken)
frontier.put((distance(new_state), new_state))
_, current_state = frontier.get()
print(f"Solved in {counter:,} steps ({len(current_state.taken)}) tiles")
Hi, I wanted to notify that the ServerHintData message is the only one that does not provide the name of the next player in the turn. All the other messages sent at the end of an action have it in their payload.
Thank you.
When the game terminates a ServerGameOver packet is sent, then the server abruptly stops, this means that the clients have a very small window to receive the message, if they can't receive it a ConnectionResetError is lanched causing a crash on the client
Packets that represent other players actions (ServerPlayerMoveOk, ServerPlayerThunderStrike, ServerActionValid) don't have a field for understanding who is the player that made the play and the index of the card played
When reusing multiple sequential times the server.py script the used port is left occupied, disabling subsequential runs until the specified costant is modified manually.
This behaviour was observed both when exiting with the exit command or when the game is regularly finished
When using a custom client that plays without user inputs, a race condition occurs if the client is too fast to play at the start of the game.
When all the players are ready, the game doesn't automatically start, instead a ServerStartGameData packet is sent, this packet asks for a confirmation that the game can indeed start in the form of a ClientPlayerReadyData. No further feedback is given by the server after the response, the result is that the client assumes that he can start playing while it could be one of 3 cases:
This causes the server to ignore the majority of game requests at the start of the match if the clients are too fast.
This is further supported by the fact that by putting a sleep function after sending ClientPlayerReadyData no further problems are detected and the match goes smoothly.
Curiously I think this stems from the famous two general problem
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.