
Hi, thank you for updating my code. I runned it using a short string like "HELLO" and and the program was able to guessd the string hello as final answer correctly. However, when i tried input long string to guess it then it couldnt do that. Below is the sample of input that tried running. I think im missing something in the toString method or so. Kindly assist. Thank you
Enter string to guess: "For God loves the world and His mercry endured forever His grace is so suffient to everyone on the earth"
Enter number of organisms per generation: 50
Enter number of generations: 100
Enter mutation probability (between 0 and 1): 0.01
Generation 10: Best Answer - FveMzG {LBZeqlXzaodXpOV ZgjxwlFvorScpoRScHhPnG wtkqvri {OlP[cvfLLqEWstoeoIJcF xnVDVtEAbeYnf Hv [vM {EZxT, Average Fitness: 15.72
Generation 20: Best Answer - Foe [wlKllTQiJgpsfdXcnV {tCBtSf okDxvCodjHOPnO Mfdqvki {Ol [cvlXDimFonmkTfUSVnC BgpqqMb Ynf Gn zvM {EZxy, Average Fitness: 24.92
Generation 30: Best Answer - FyM [wkFooFbGKyrl NXylV ZODxdISacrbcyoRfzKbqnG MfAlvyb {Ol AcvZXZlmWstVeoffnznCsQGlrLMbeYnB Bn AvM {EZwD, Average Fitness: 28.4
Generation 40: Best Answer - FyM [wunsYFbCKyul BXhBV yMjBobf {Umcpm i UOPTv HukqvkL UOl fwD [ZimWsgpkEfvUvnCxKblrLsbejnB Rv iCM {EnWh, Average Fitness: 30.92
Generation 50: Best Answer - FoM [VtRFoFem Xzs NXylV aaDBebfpNUmlmQHcudBmnmp[ukVvtZ {Os fwDR[Zim swpkEfvUvnkxKbXrwMbePnB Gn yvM {pZpA, Average Fitness: 32.62
Generation 60: Best Answer - FBP CVtRdoFeQ Xzs NXglp qtvBwlRUmUmbpm Z tyPIy HukuvD sIOB gZDckZim sIpeofvUQnCbKiBlNqbnYnzJGnubVM {OOju, Average Fitness: 36.64
Generation 70: Best Answer - FBP qVtRdoFeQZXzs NXylm VtpSUbw {Urbpp Z sylIv suklvBB Ros gZvgvOiq ZIpeOtOh nY MgpQsvbjjnJZGn YVM {pOoE, Average Fitness: 37.96
Generation 80: Best Answer - FMR [sLRXoFeC yrh NXylV aSpSUNxJmdTcpE Z ThUTv Wc RPks rUi Rf cNZiK sgpbVovOtnY MgpLivUPVKB Gi wVYjenita, Average Fitness: 36.68
Generation 90: Best Answer - FoMuqsZpJoFeg Vrh NgylV aSuzUbtVmbNcpy ZysyPIw GukvvoivHzs gZvgkZom xoovEtQUanMWBLqrIcHUvnf Gq YvM { OGg, Average Fitness: 39.9
Generation 100: Best Answer - RMT VqLRXoOeg AzEEUcdlJ ctDWwi YSHFcpy ZSAwiIw HjkJvoSvHzs gZxgkGom TCKkmYQUHnCxwO lLGIHCnf fn YvM {aOGh, Average Fitness: 37.96
Final Answer: RMT VqLRXoOeg AzEEUcdlJ ctDWwi YSHFcpy ZSAwiIw HjkJvoSvHzs gZxgkGom TCKkmYQUHnCxwO lLGIHCnf fn YvM {aOGh

Trending nowThis is a popular solution!
Step by stepSolved in 7 steps with 1 images

- In this assignment, your program will read up to 80 characters from the keyboard and store thecharacters in a string (think about the string / buer size you should declare). The characters couldbe letters, numbers, punctuation, and spaces. You CANNOT use %s and scanf or fscanf(stdin) to do this task because it is not safe; do not use fgets either for the purpose ofthis exercise. Instead, you may use scanf with %c or the getchar() function to read character-bycharacter and then save them to the string. The string should not include the new-line character.After reading the characters into the array, print it on the screen (with a new line character) byusing %s with the printf function. Then your program will call a function named reverseStringthat will take the string as its argument. The function will reverse the string (in place) and returna pointer to the reversed string back to the calling function. In your main program, print thereversed string with a new line.You may NOT use a…arrow_forwardIn the following code stream, identify if there are any hazards. Crisply describe if it is possible to get around the hazards, and what the resulting steps will be. lw r2, 0(r1) add r3, r2, r3 sub r1, r1, r4arrow_forwardIm stuck on this java code. The code is supposed to ask user for a string. Characters that are number, are doubled and replaced with the sum. The characters that are upper are replaced with lower and lower are replaced with upper. It should keep asking user for string until user input Q to end the program. example 1: original: 3rD converted: 6Rd ex 2: original: 6sJ converted: 3Sj (when a value is doubled and its than 9, the two digits are added. so 6 * 2 is 12. And then add the two digits. so 1 + 2 = 3.) I'm having problem with the code that its not reading where it replace the lower to upper and vice versa. this is my code so far: import java.util.Scanner;public class Convert {public static void main(String[] args) {Scanner input = new Scanner(System.in);String original, converted;while (true) {System.out.print("Original String (input):");original = input.nextLine();if (original.equals("q") || original.equals("Q")) {break;}char[] chars = original.toCharArray();for (int i = 0; i <…arrow_forward
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY





