The next step is where I am having issues that I am hoping somebody will be able to help me solve. So maybe I'm misunderstanding this, but the way I understand it is that I need two putty terminals open, one will do the command above except replace learners.human_learner.ImmediateHumanLearner with learners.base.RemoteLearner (
python src/run.py src/tasks_config.challenge.json -l learners.base.RemoteLearner) and the other one will run as the agent. There is an example agent that is conveniently already created to help get people like me started, but my issue is when I try to use it, it doesn't appear to work.
So after executing the command above on Putty #1, I do
python evaluation/examples/linux-python/agent/example_learner.py on Putty #2. From my understanding, this should start a session that will interact with Putty #1 and things should start happening. What I get is output on Putty #2 screen that shows "Connecting to tcp://18.104.22.168:5556", but nothing is happening on either terminal besides that.
Is there a step I'm missing to make these two putty sessions talk to each other or do I need to do all of this on the same putty environment or something?
What am I missing here?
Just wanted to add that I believe both of these are listening on 22.214.171.124 on port 5556. I tried to run this command instead just to make it more explicit.
python src/run.py src/tasks_config.challenge.json -l learners.base.RemoteLearner --learner-address=126.96.36.199 --learner-port=5556
So after more debugging I have narrowed it down I believe to the command
_reward = socket.recv(). The way I was able to narrow it down to that is using print commands with numbers so it would output when it got to that point in the agent script. So it made it into the read_data function and then it is waiting at the socket.recv forever. So, what that tells me is that it isn't ever getting anything transmitting from the other side. If anybody else has had this issue, I would be very interested in how you fixed it.
Since the issue appears to be that there is nothing being received, I decided to go check out the other side of this equation. My new question was: "What's suppose to get sent that this would be recieving?" So I went and checked out the remote learner that is suppose to hook up with this. So when I did a
vi src/learners/base.py I found the remote learner class and it is getting down to the command
handshake_in = self.socket.recv().decode('utf-8'). At this point, it appears to be hanging and not getting to the handshake below. This probably explains why my agent isn't doing anything, but I still need to figure out what that
self.socket.recv().decode('utf-8') is suppose to be doing and then figure out why it isn't so if anybody has insight on that I would appreciate the help.
I figured out my issue. So what I needed to do was use
ifconfig to find the ip address and then use that instead of 188.8.131.52. So instead of using the default ip that came in the example agent I needed to change that to the inet addr of eth0. Once I fixed this, it ran smoothly. I learned a ton about this by deep diving in to fix it so hopefully now I can get some results.