AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

LPP2 questions
 
 

I’ve just been checking out the new LPP2 from GitHub, which is slightly different from last years LPP2.
Download & install Express & Socket.io

Open cmd prompt/dos box to the folder containing server.js.
Enter (you need to be connected to the internet when you do this)
npm install - -save .(JavaScript must be enabled to view this email address) (change if different version)
npm install - -save socket.io
npm install - -save socket.io-client
npm install - -save serve-static

if all is well
Enter
node server.js
which should display ‘listening’
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

I found a few bugs with some of the files.
controlPanel.html
src=“http://aisb-loebner-prize.org/scripts/jquery.min.js”>
src=“http://aisb-loebner-prize.org/scripts/socket.io-1.4.5.js”>
which I think should be
src=“http://127.0.0.1:8080/scripts/jquery.min.js”>
src=“http://127.0.0.1:8080/scripts/socket.io-1.4.5.js”>
to match judge/confederate.html

var URL=“127.0.0.1:8080”; (this should be “http://127.0.0.1:8080”
var NAME=“CONTROLLER”;
var SECRET=“abc123”; (this is “abv123” in server.js, one needs to be changed, so they both match)

when judge.html loads it crashes server.js, which seems to have something to do with
‘case “recap”:’ in ‘function handleControlMessage’ in server.js.
I commented out this bit of code, and judge.html now loads without crashing server.js.

Now when judge.html loads it connects with it controlPanel.html, but shows 2 buttons,
‘Robot Left’ & ‘Robot Right’.
I think these buttons should only be shown when a round ends,
and if you click one before the round has started, it crashes server.js.
They do dissappear when a ‘new round’ is started.

To TEST
Make a copy of confederate.html and rename it to ai0.html.
Change NAME to ai0
Run ‘node server.js’
Then open controlPanel.html, judge.html, ai0.html & confederate.html in a browser.
On controlPanel.html click ‘New Round’, ‘Start Round’, then enter text in judge.html input boxes to start a chat.

The speech bubbles are a nice touch.
I’ve tested LPP2 in Firefox, IE11 & Chrome on Windows 8.1, and it works pretty much the same in all 3.

There is also bridge.js for connecting the old LPP to LPP2.(not sure how this works)

 

 

 
  [ # 1 ]
Stephen Mann - Mar 18, 2018:

when judge.html loads it crashes server.js, which seems to have something to do with ‘case “recap”:’ in ‘function handleControlMessage’ in server.js.
I commented out this bit of code, and judge.html now loads without crashing server.js.

Me too. I had to change this line :

if (messages[currentRound][c]!=undefined)

to :

if (messages[currentRound]!=undefined && messages[currentRound][c]!=undefined)

 

 

 
  [ # 2 ]

Thanks Denis
I’ve changed code to match yours and judge.html loads OK now.grin

 

 
  [ # 3 ]

Have any of you opened an issue on gitHub for this? It would be VERY helpful to do so, you know. Many people, myself included, are trying to make sure that the new LPP is up to snuff and ready to use once the contest begins, but not all of us regularly visit chatbots.org to see threads like this one. If you haven’t opened an issue about this yet, I strongly encourage you to do so. thanks. smile

 

 
  [ # 4 ]

It’s done : https://github.com/jhudsy/LoebnerPrizeProtocol/issues

And, by the way, chatbots.org also seems to have some bugs since today. I was not able to connect. If an administrator reads that, thank you.

 

 
  [ # 5 ]
Denis Robert - Mar 20, 2018:

And, by the way, chatbots.org also seems to have some bugs since today. I was not able to connect. If an administrator reads that, thank you.

We’re well aware, and the dev team is working on the issue, but it’s slow going. Hopefully they’ll have it working well soon.

Meanwhile, thanks for reporting the issue. I’m currently hip-deep in baby dragons with a couple of other projects, but I hope to get them cleared up by the end of the month. smile

 

 
  [ # 6 ]
Stephen Mann - Mar 18, 2018:

I’ve just been checking out the new LPP2 from GitHub, which is slightly different from last years LPP2.
Download & install Express & Socket.io

Open cmd prompt/dos box to the folder containing server.js.
Enter (you need to be connected to the internet when you do this)
npm install - -save .(JavaScript must be enabled to view this email address) (change if different version)
npm install - -save socket.io
npm install - -save socket.io-client
npm install - -save serve-static

if all is well
Enter
node server.js
which should display ‘listening’

Hi everyone. The previous versions of Node and the server.js i managed to get working but since there have been changes i can’t get it to work. I uninstalled everything, installed Nodejs from their site, ran the commands above and run the server where it says listening but cannot get any of the clients to register or communicate with the server?

Any thoughts on what else i should try?

Thanks

Dan

 

 

 
  [ # 7 ]

Hi, Dan! smile

I can help you with that, if you like. We have options on how best to go about me helping. the “best” and most timely would be to connect via either Skype or Google Hangouts. We could also try this via email, but there’s considerable lag with that method. I’m currently sans phone, so that isn’t a viable option, I’m afraid. We could also use the forum here to work through this, but it would need its own thread. How would you like to proceed?

 

 
  [ # 8 ]

Hi Dave, thanks for getting in touch. I can probably get Skype setup. What time zone are you in? I’m in the UK. Otherwise it might help others to have a step by step thread about setting the new protocol up.

regards

Dan

 

 
  [ # 9 ]

I’m in Eastern US (GMT - 5 hours, now that we’re both in “Summertime/Daylight Saving Time”), but as I deal with people from all over the world, I tend to be up and at my desk for close to 18 hours per 24. As my schedule is pretty flexible, if you can tell me what times are most convenient for you, I can make sure to be available during those times.

 

 
  [ # 10 ]

Hi Dave, got it working,it was a damaged jquery.min.js, also i had to change

if (messages[currentRound][c]!=undefined){

to :

if (messages[currentRound]!=undefined && messages[currentRound][c]!=undefined){

now i have to figure out what to send programmatically to emulate the what the confederate.html does.

 

 
  [ # 11 ]

Does anyone know what you have to send to the server.js to register a client, not from the html examples given but directly by a program?

what i am after is some simple lines of text to send to to the server for:

Registration
sending a message

once i am register i can then listen to see what the sever sends back for new rounds and messages from the judge.

I currently can’t get a program to send a direct string to register with the server.

I put a packet sniffer on the confederate.html to see what it was sending

This was sent from the ai.html browser page along with a load of webstuff before it
[“control”,”{\"status\":\"register\",\"id\":\"ai0\",\"secret\":\"abc123\"}”]

This was sent when i typed hello to the judge (which works fine using ai.html)
[“message”,”{\"content\":\"hello\",\"to\":\"judge0\",\"id\":\"ai0\",\"secret\":\"\"}”]

but if i issue the registration command to the server it does not register and neither does the message command??

Everthing works using the judge.html, confederate and a newly created ai.html and controlpanel.html i just want to replace the ai.html with a program that looks the same to the server.js

anyone else got any further with this?

 

 
  [ # 12 ]

Daniel, what language is your program written in, and can you show me the code that you use to send the registration data? This might help us to figure out what’s failing.

 

 
  [ # 13 ]

I am currently using Embarcadero RAD studio, i know that i am sending characters since i put a tcp snooper on and i can see text coming out. What I am not sure of is what the server.js program expects to see.

The confederate.html seems to send a whole load of html code before sending any registration code.

This is the registration code i captures going into the server.js

[“control”,”{\"status\":\"register\",\"id\":\"conf0\",\"secret\":\"abc123\"}”]

But there was a large amount of other HTML code sent before this and if you send just this nothing happens.
this is what is sent when you start my ai.html which is the same as confederate with the name and password chanaged.


Send: Return Code: 0x00000000
GET /scripts/jquery.min.js HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: io=dsajVI7XQ1iRAAsSAAAJ
If-None-Match: W/“16bb0-162ece75d3d”
If-Modified-Since: Sun, 22 Apr 2018 10:30:08 GMT

Receive: Return Code: 0x00000000
HTTP/1.1 304 Not Modified
X-Powered-By: Express
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Sun, 22 Apr 2018 10:30:08 GMT
ETag: W/“16bb0-162ece75d3d”
Date: Sun, 22 Apr 2018 13:33:46 GMT
Connection: keep-alive

 

Send: Return Code: 0x00000000
GET /socket.io/?EIO=3&transport=polling&t=MBjZtk_.0&sid=b2ftqmTdUzCHfZzuAAAK HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: io=b2ftqmTdUzCHfZzuAAAK

 

Receive: Return Code: 0x00000000
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 4
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: null
Set-Cookie: io=b2ftqmTdUzCHfZzuAAAK; Path=/; HttpOnly
Date: Sun, 22 Apr 2018 13:33:46 GMT
Connection: keep-alive

 

Send: Return Code: 0x00000000
GET /scripts/socket.io-1.4.5.js HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: io=dsajVI7XQ1iRAAsSAAAJ
If-None-Match: W/“17d9b-162c0334666”
If-Modified-Since: Fri, 13 Apr 2018 18:10:08 GMT

 

Receive: Return Code: 0x00000000
HTTP/1.1 304 Not Modified
X-Powered-By: Express
Accept-Ranges: bytes
Cache-Control: public, max-age=0
Last-Modified: Fri, 13 Apr 2018 18:10:08 GMT
ETag: W/“17d9b-162c0334666”
Date: Sun, 22 Apr 2018 13:33:46 GMT
Connection: keep-alive

 

Send: Return Code: 0x00000000
GET /socket.io/?EIO=3&transport=polling&t=MBjZtk9 HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: io=dsajVI7XQ1iRAAsSAAAJ

 

Receive: Return Code: 0x00000000
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 101
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: null
Set-Cookie: io=b2ftqmTdUzCHfZzuAAAK; Path=/; HttpOnly
Date: Sun, 22 Apr 2018 13:33:46 GMT
Connection: keep-alive

 

Send: Return Code: 0x00000000
GET /socket.io/?EIO=3&transport=polling&t=MBjZtkZ&sid=b2ftqmTdUzCHfZzuAAAK HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: io=b2ftqmTdUzCHfZzuAAAK

 

Receive: Return Code: 0x00000000
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 5
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: null
Set-Cookie: io=b2ftqmTdUzCHfZzuAAAK; Path=/; HttpOnly
Date: Sun, 22 Apr 2018 13:33:46 GMT
Connection: keep-alive

 

Send: Return Code: 0x00000000
POST /socket.io/?EIO=3&transport=polling&t=MBjZtk_&sid=b2ftqmTdUzCHfZzuAAAK HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Content-Length: 81
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36
Content-type: text/plain;charset=UTF-8
Accept: */*
Accept-Encoding: gzip, deflate, br
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: io=b2ftqmTdUzCHfZzuAAAK

78:42[“control”,”{\"status\":\"register\",\"id\":\"ai0\",\"secret\":\"abc123\"}”]

Receive: Return Code: 0x00000000
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 2
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: null
Set-Cookie: io=b2ftqmTdUzCHfZzuAAAK; Path=/; HttpOnly
Date: Sun, 22 Apr 2018 13:33:46 GMT
Connection: keep-alive


Has anyone solved this issue yet?

 

 

 
  [ # 14 ]

As I’ve never used a “TCP snooper” before, I honestly don’t know if that’s what we’re supposed to be seeing or not. When I debug the LPP2, I usually put in all sorts of “console.log()”  statements into server.js so that I can capture inputs and outputs, and then I monitor the “DOS window” for activity. I also use Google Chrome for testing the client-side JS with the JavaScript console open, and toss in some “console.log()” statements into the client-side code so that I can do the same thing there.

Now when I was working with Bruce last year to get his entry to work with the LPP2, I ended up having to write a “bridge” in PHP to “translate” his pure sockets output from ChatScript into the web sockets format that the LPP2 uses. I’m wondering if you might be experiencing the same trouble here, or something similar.

 

 
  [ # 15 ]

Hi Daniel

I used Firefox (Tools -> Web Developer -> Web Console) to see what info was sent from confederate.html to server.js.
I got my chatbot connected directly to controlPanel.html & judge.html, via server.js.
It’s written in Java, not sure what language your using, but full details available here
I hope this is of some help & good luck.

 

 1 2 3 >  Last ›
1 of 4
 
  login or register to react