New Loebner Prize Protocol

  • 3 Replies
  • 547 Views
*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 801
    • 8pla.net
New Loebner Prize Protocol
« on: May 14, 2017, 05:41:54 pm »
Shared here, for the sake of discussion only, here is my BASH script prototype to install the New Loebner Prize Protocol on Linux.  Please do not try to run this script on a computer.  I removed the shebang #!/bin/bash from the top of the script, so it can not run.  This early work in progress is throwing errors as of this post.

Disclaimer: Any and all use of the this BASH script in any form is strictly prohibited. It is strictly for discussion purposes only.

Code: [Select]
(Removed the shebang so the BASH shell can not interpret this script.)

sudo -s

# Install npm:

apt install npm

# Install express

apt install node-express-generator

# Install socket.io

npm install -g socket.io

# Install socket.io-client

npm install -g socket.io-client



After the script finished a test run... Running the server on node.js

Code: [Select]
node server.js

produced this error:  Cannot find module 'socket.io'

Code: [Select]
DEPRECATED use https://github.com/pillarjs/path-to-regexp
module.js:328
    throw err;
    ^

Error: Cannot find module 'socket.io'
    at Function.Module._resolveFilename (module.js:326:15)
    at Function.Module._load (module.js:277:25)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/human/Downloads/LoebnerPrizeProtocol-master/server/server.js:5:8)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)

It seems the script may have successfully installed socket.io  which can be found here: /usr/local/lib/node_modules/socket.io  and also express which can be found here:  /usr/local/lib/node_modules/express.  But this is all going to have to be looked at more closely.

Please refrain from disparaging the new LPP here.  The purpose of this thread is to discuss how to setup the new Loebner Prize Protocol.

Reference:  https://github.com/jhudsy/LoebnerPrizeProtocol
« Last Edit: May 14, 2017, 06:13:58 pm by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 801
    • 8pla.net
Re: New Loebner Prize Protocol
« Reply #1 on: May 14, 2017, 06:22:46 pm »
UPDATE:   server.js is "listening"

Edited file: server.js

Code: [Select]
//var io=require('socket.io')(http);
var io = require('/usr/local/lib/node_modules/socket.io')(http);
//var client=require('socket.io-client');
client=require('/usr/local/lib/node_modules/socket.io-client');

Quote
LinuxShell#: node server.js
DEPRECATED use https://github.com/pillarjs/path-to-regexp
listening




This is a proof of concept that the new LPP server is running on Linux.  Once again, it is for discussion purposes only.  Obviously, it has had minimal testing.  Exporting the shared libraries on Linux can be done later...  Next on the agenda, let's try to test run some chatbot contestants and judges.



« Last Edit: May 15, 2017, 04:24:45 pm by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 801
    • 8pla.net
Re: New Loebner Prize Protocol
« Reply #2 on: May 14, 2017, 10:02:39 pm »
Code: [Select]
node server.js
Code: [Select]
DEPRECATED use https://github.com/pillarjs/path-to-regexp
listening
connection detected
connection detected
#:/server/server.js:227
    clients[o.to].emit("message",JSON.stringify(o));
                 ^

TypeError: Cannot read property 'emit' of undefined
    at handleCommunicationMessage (/var/www/html/LPC/server/server.js:227:18)
    at Socket.<anonymous> (/var/www/html/LPC/server/server.js:321:38)
    at emitOne (events.js:77:13)
    at Socket.emit (events.js:169:7)
    at /usr/local/lib/node_modules/socket.io/lib/socket.js:509:12
    at nextTickCallbackWith0Args (node.js:419:9)
    at process._tickCallback (node.js:348:13)

The server starts.

Connections are detected.

Crashes on first client input, "hello"

NOTE:  This is a test run on a "localhost:8080" instead of '127.0.0.1:8080'

My Very Enormous Monster Just Stopped Using Nine

*

8pla.net

  • Trusty Member
  • *********
  • Terminator
  • *
  • 801
    • 8pla.net
Re: New Loebner Prize Protocol
« Reply #3 on: May 15, 2017, 03:36:06 pm »
Code: [Select]
//var io=require('socket.io')(http);
var io = require('/usr/local/lib/node_modules/socket.io')(http);
//var client=require('socket.io-client');
var client=require('/usr/local/lib/node_modules/socket.io-client');

Oops!  I made a syntax error in my patch, and fixed it by adding "var" to the client variable.  Please note, this patch should be considered a temporary workaround.  However, the new Loebner Prize Protocol seems to be running in Linux, though testing is minimal at this point.   


Quote
node server.js
listening
connection detected
connection detected
connection detected
{"robot":"conf3","id":"judge0","secret":"alice"}
{"robot":"ai1","id":"judge0","secret":"alice"}


This is still a work in progress for discussion purposes only.
My Very Enormous Monster Just Stopped Using Nine

 


Boltzmann machine .... amazing!!!
by ranch vermin (General AI Discussion)
Today at 10:32:00 am
AI safety
by Zero (General AI Discussion)
Today at 09:43:38 am
Grats to SquareBear
by Art (General Chatbots and Software)
September 24, 2017, 06:47:12 pm
XKCD Comic : Thread
by Tyler (XKCD Comic)
September 23, 2017, 12:00:05 pm
outline from gadient mask
by ivan.moony (General AI Discussion)
September 23, 2017, 10:45:22 am
Dreaming
by Memnon (New Users Please Post Here)
September 23, 2017, 10:02:32 am
AWESOME program that can find similar matches and exact matches (images) !
by LOCKSUIT (General Chat)
September 23, 2017, 07:53:27 am
Map of Computer Science
by keghn (General AI Discussion)
September 23, 2017, 01:34:02 am

Users Online

15 Guests, 1 User
Users active in past 15 minutes:
ivan.moony
[Trusty Member]

Most Online Today: 30. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)

Articles