Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Read and Writes From A .txt file to a 2-d array(Need help with the title, and some errors im getting)
Read and Writes From A .txt file to a 2-d array [message #1760234] Tue, 25 April 2017 01:39 Go to next message
Graham irwin is currently offline Graham irwinFriend
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.
Re: Read and Writes From A .txt file to a 2-d array [message #1760509 is a reply to message #1760234] Thu, 27 April 2017 19:42 Go to previous message
Graham irwin is currently offline Graham irwinFriend
Messages: 2
Registered: April 2017
Junior Member
Quick update, I fixed the first problem, but I still don't have any solutions for the last two
Previous Topic:JDTCompilerAdapter invalid dependency
Next Topic:Different Class Sizes Eclipse vs Ant Using build.compiler jdt
Goto Forum:
  


Current Time: Fri Apr 20 03:28:27 GMT 2018

Powered by FUDForum. Page generated in 0.01847 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software