As for the practical uses, you can make it specific to tasks that you might need, like managing your information and creating interfaces by just explaining what you want done.
You would need to expand this encoder so that the output code could read key words, but for now it is just meant to generate user statements and computer responses.
Keeping it simple to start.
You can build your AI from this to start and then improve this program to make it more useful as an AI builder that actually can do something useful as well as carry on a conversation. (user defined data base conversation that grows as more conversations are made)
NOTE: Type "quit" in the interface to quit and close the file properly and then you can copy and paste the code in your working project.
Code: Select all
PROCgraphics(1000,500)
A=OPENOUT("aitest2021.BBC")
PROCwrite("INPUT "+CHR$(34)+CHR$(34)+";what$")
REPEAT
GCOL 15
MOVE 10,130:INPUT"YOU SAY >";say$
GCOL 0:MOVE 10,130:PRINT"YOU SAY >? ";say$
IF say$="quit" THEN PROCwrite("END"):CLOSE#A:QUIT
GCOL 15 MOVE 10,130:INPUT"I SAY >";res$
GCOL 0:MOVE 10,130:PRINT"I SAY >? ";res$
IF res$="quit" THEN PROCwrite("END"):CLOSE#A:QUIT
outst$="IF what$="+CHR$(34)+say$+CHR$(34)+" THEN PRINT"+CHR$(34)+res$+CHR$(34):
BPUT#A,outst$+CHR$(13);:BPUT#A,CHR$(10);
UNTIL FALSE
END
DEF PROCgraphics(x,y)
VDU 23,22,x;y;8,15,16,1
OFF
VDU 5
ENDPROC
DEFPROCwrite(st$)
BPUT#A,st$+CHR$(13);:BPUT#A,CHR$(10);
ENDPROC