Read and Writes From A .txt file to a 2-d array [message #1760234] |
Tue, 25 April 2017 01:39 |
Graham irwin Messages: 2 Registered: April 2017 |
Junior Member |
|
|
Quasi AI
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I'm trying to build a quasi "learning" AI, by using 2-d arrays (see code below), and I started this project in BlueJ, and when I try to transfer it over to Eclipse I receive errors (The public type Hal9000 must be defined in its own file Line 17). Anyway, I cant switch the class to abstract, because i have the program calling back to itself later (new Hal9000 line 74). Any suggestions?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I'm also trying to make this AI do so called "learning". I plan on doing this by instead of going to the default line in the 2D array named chatbot (I think the default is line 65), it will ask the user for the proper response to the question. For instance, if the program is coded to respond to the phrase "Hello", and the user inputs "Hey" instead, it will output a question asking the user to input the response to that, and then will store that question and response inside a text file (using filereader Line 71-96). By doing this, the program will now be able to output a response for the input of "Hey".
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I also need to be able to fill the 2D array (chatbot) with the info from the text file. I was thinking of using a buffered linewriter and delimiters, but I don't exactly know how to do that properly. Any help?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Anyway, thank you for reading this far, and any help is greatly apprenticed.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03826 seconds