Open eubinecto opened 3 years ago
the goal is to write:
Agent
agent.py
RandomAgent
random_agent.py
Server
so that on running the following commands in bash:
python3 random_agent.py localhost 12345 java -jar kalah/ManKalah.jar "nc localhost 12345" "java -jar kalah/MkRefAgent.jar"
we can replicate exactly the same behaviour of:
nc -l localhost 12345 java -jar kalah/ManKalah.jar "nc localhost 12345" "java -jar kalah/MkRefAgent.jar"
note: the -l option for nc command is for "listen mode. For inbound connects".
-l
nc
well, that's the goal as of right now. Just replicate what we can do with the Java code base.
socket
pytransitions/transitions
board
Board
still having some issues with handling game over message. Will fix this after I'm dome with #3
why?
goal?
the goal is to write:
Agent
class inagent.py
. The base interface for all agents. Not runnable. Just implements reusable code for other agents.RandomAgent
class inrandom_agent.py
. An agent that just makes random moves. This is also a runnable script.Server
class for hosting an agent with a server socket.so that on running the following commands in bash:
we can replicate exactly the same behaviour of:
well, that's the goal as of right now. Just replicate what we can do with the Java code base.
how?
socket
module for receiving message from & sending protocol to the game enginepytransitions/transitions
seems like a good entry point for building FSM in python.Agent
maintainsboard
member variable, of typeBoard
.