|
Posted: Apr 18, 2017 |
[ # 16 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
Thanks for those tips Don. A few corrections for anyone else like myself:
It should be npm install express, npm install socket.io and npm install socket.io-client
Also, how do you type in the judge program? I just see 4 blank boxes, none of which will accept text (see attached)
Image Attachments
Click thumbnail to see full-size image
|
|
|
|
|
Posted: Apr 18, 2017 |
[ # 17 ]
|
|
Guru
Total posts: 1009
Joined: Jun 13, 2013
|
Steve Worswick - Apr 18, 2017: Thanks for those tips Don. A few corrections for anyone else like myself:
It should be npm install express, npm install socket.io and npm install socket.io-client
Oh, right. Of course.
So to get everything running, first open a command prompt (cmd.exe on Windows, you know, the old DOS program), navigate to where you put the server.js file and type “node server.js”. After a few seconds the word “listening” will appear in the command prompt.
Then launch controlPanel.html, judge.html, confedorate.html, and a copy of the latter with in its source code the name and secret changed to “ai0” and your “secret” of choice. For each html file launched, the command prompt will display “connection detected” and the corresponding name in the table on controlPanel.html will turn green (see screenshot).
Then on controlPanel.html, click “New round”. The other three html files will now have a “New round about to begin” message on them. Click those away.
Next, click “Start round” on controlpanel.html. The other three html files will now have a “Round has started” message on them. After that, the narrow input boxes at the bottom become typeable. The large boxes are just for displaying previous conversation.
I don’t have the hang of it yet entirely because it seems sometimes server.js breaks the connection if I do something in a slightly different order.
Image Attachments
Click thumbnail to see full-size image
|
|
|
|
|
Posted: Apr 18, 2017 |
[ # 18 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
Got it. Thanks Don. It was me not clicking on “start round”.
Next dumb question: Where do the judge’s messages appear on the PC so the bot can use them as input?
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 19 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Yes, being able to intercept the judges’ chat would be an important thing, I think.
I got everything else working, so it’s now time for me to RTFM.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 20 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
You know, looking at this, and the code that it contains, I’m relatively certain that we could set this up across the internet, if we collaborated a bit. Not only that, but we could even set things up so that our chatbots could converse with each other. All ot would take is a bit of creative scripting, an agreed upon server and a slightly adventurous spirit.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 21 ]
|
|
Guru
Total posts: 1009
Joined: Jun 13, 2013
|
Steve Worswick - Apr 18, 2017: Next dumb question: Where do the judge’s messages appear on the PC so the bot can use them as input?
That’s not a dumb question though: The messages aren’t transferred to the PC. I believe we are expected to make our own programs do the whole client handshaking, socket connecting and message sending directly.
However, Denis Robert has made a version of the confederate.html file that creates and reads the message’s letters as directories on your PC just like the old Loebner protocol used to, so if you just run that alongside the rest it’ll function as middle man and you won’t have to change a thing from last year. All you have to do is change the directory path in the html source code of Denis’ file (and the “name” and “secret” parts of course, to match those in server.js).
Myself, I’m going to try if I can’t do something similar to Denis’ solution and make an html transfer the whole message to a local file, and use that as middle man. I’d rather not break the messages up into letters, seeing as I still don’t know what caused them to mix last year.
Dave - Apr 18, 2017: I’m relatively certain that we could set this up across the internet, if we collaborated a bit. Not only that, but we could even set things up so that our chatbots could converse with each other.
The files do appear to be in touch with the internet while running, but couldn’t that be used for cheating?
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 22 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
If used in the Loebner Prize, yes. But I’m sure that the team that sets up the network for the competition would use a closed network, with no access to the web. It’s easy to prevent Internet access by simply making the network an isolated one. I was talking about this kind of use outside the bounds of the competition, for practice and collaboration, rather than within the competition. To use the Internet within the competition would be cheating, indeed.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 23 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Don Patrick - Apr 19, 2017: The messages aren’t transferred to the PC. I believe we are expected to make our own programs do the whole client handshaking, socket connecting and message sending directly.
However, Denis Robert has made a version of the confederate.html file that creates and reads the message’s letters as directories on your PC just like the old Loebner protocol used to, so if you just run that alongside the rest it’ll function as middle man and you won’t have to change a thing from last year. All you have to do is change the directory path in the html source code of Denis’ file (and the “name” and “secret” parts of course, to match those in server.js).
Given that the transfer of messages to and from one node to another in this setup is performed as a complete string, there is a two-fold effect in play. First, there is no more possibility of a bot “cheating” by simulating mistyped characters, then backspacing and correcting them, and second, there is no loss of efficiency or possibility of glitches in converting a message string into a folder hierarchy to be reassembled at the other end back into a text string again. Your idea, Don, of creating a text file to be read and written to is a good compromise, but also unnecessary, IMHO, unless you want to create a secondary conversation log for your own records by adding a timestamp to the filename, but I think that such logs should be generated server-side anyway, with the “name” of both the judge and the “name” of the competitor (whether human or AI - these names should be assigned to the participants by the officials, I think, and not be made public till after the competition), as well as a timestamp. Such logs could prove useful for many reasons, and as I mentioned, should already be generated by the server already.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 24 ]
|
|
Guru
Total posts: 1009
Joined: Jun 13, 2013
|
Dave Morton - Apr 19, 2017: If used in the Loebner Prize, yes. But I’m sure that the team that sets up the network for the competition would use a closed network, with no access to the web.
But the html files have script tags in them directing to “https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js” and such, which is an outside domain.
Dave Morton - Apr 19, 2017: there is no loss of efficiency or possibility of glitches in converting a message string into a folder hierarchy to be reassembled at the other end back into a text string again.
That’s what I thought last year. Let’s see…, Denis’ message-to-folder conversion would be running on the AI’s computer, so… the only thing that could go wrong there is if one folder takes longer to create than another folder, and my AI reads the first one that shows up. Is it possible that mkdir commands are executed out of sequence?
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 25 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
So far as the jQuery script is concerned, that could be a local file, rather than a call to the CDN, so that’s not a hard thing to fix. With regard to mkdir running out of order that’s a real possibility on a Windows computer. Not certain about *nix/mac, though I suspect that the possibility is not 0% there, either. This is why I think that it would be best to simply lose that aspect of the protocol altogether.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 26 ]
|
|
Guru
Total posts: 1009
Joined: Jun 13, 2013
|
Right, so maybe my program was running too fast last year when it checked for folders every 30 milliseconds, though that doesn’t explain the output issues. This time I could wait until the carriage return folder shows up, wait some more, and then read all the folders in alphanumerical sequence. Or use files.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 27 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
After a bit of experimenting I was able to modify my local copy to have server.js also serve the JavaScript files to the client HTML pages, thus avoiding the need to access the Internet. I’ve also opened an issue on GitHub describing the proposed changes, and I’ve submitted a pull request as well. now I need to get back to my schoolwork, which I have been egregiously ignoring while I worked on this.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 28 ]
|
|
Guru
Total posts: 1009
Joined: Jun 13, 2013
|
Well done, Dave. +1 for security.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 29 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
Don Patrick - Apr 19, 2017: This time I could wait until the carriage return folder shows up, wait some more, and then read all the folders in alphanumerical sequence. Or use files.
I think that’s the way I’ll probably play it. Using Denis Robert’s script but instead of waiting 3 seconds and hope it’s an “end of message”, just wait for the enter button.
|
|
|
|
|
Posted: Apr 19, 2017 |
[ # 30 ]
|
|
Guru
Total posts: 1081
Joined: Dec 17, 2010
|
I did get everything running. But I hit some glitches.
I had to run everything on the same computer. This is not how the the final configuration will be set up.
I had an older version of Node.js installed, but I had to go with a more recent version running on windows 10 to get the server configuration right.
I used MS Edge Browser and had problems. It worked better with the clients running a chrome browser.
Remember though, if you use Denis’ browser, it requires Internet Explorer (I did not try it with Edge) and uses ActiveXObject.
When I tried to launch across the network, it would not work at first. I forgot that the IP address was hard coded in the client files for a local server and needed to be changed to access the node server (use ipconfig on the host to get the ip address).
The server was fragile for me. It crashed after I ended the round twice. I haven’t had time to debug it yet and I am not sure if I did something.
The controller required launching before the clients to work right.
|
|
|
|