How has Ralph changed from the start of the novel to the end of the novel? (His attitude and perspective on life and the nature of humans in regard to being good or evil.)
Ralph's perspective does change. At first, he is hopeful but in the end, that hope is lost.
In the beginning, Ralph realizes that the conch can be used to establish order. He accepts the role of chief because he knows he has the determination and discipline to be a good leader. He makes every attempt to protect the boys. He and Simon are the two boys who put forth the most effort in building the shelters. Ralph also stresses the importance of keeping the fire going because he knows the smoke is their best hope of being rescued. He challenges Jack when necessary and he scolds the boys when he thinks they are being lazy and/or neglecting the fire. Given all of this effort, Ralph clearly acts as though they can be rescued. His effort shows that he has hope for them. If he didn't think the boys could be good, in the ethical and moral senses, he would not go to such lengths to help create a good, moral, symbiotic community.
Over the course of the novel, things deteriorate. Simon and Piggy are killed. Simon is the moral presence and Piggy represents logic and reason. When they are killed, Ralph feels that these values (morality and reason) are killed as well. By the end of the novel, Ralph is being hunted by Jack and the others. His hope for them, as moral and reasonable human beings, is gone or close to extinction. This is why, despite being rescued, he cries in anguish when the officer asks what happened to them.
This passage at the end of the book is lengthy but it describes Ralph's final grim outlook:
Ralph looked at him dumbly. For a moment he had a fleeting picture of the strange glamour that had once invested the beaches. But the island was scorched up like dead wood—Simon was dead—and Jack had. . . . The tears began to flow and sobs shook him. He gave himself up to them now for the first time on the island; great, shuddering spasms of grief that seemed to wrench his whole body. His voice rose under the black smoke before the burning wreckage of the island; and infected by that emotion, the other little boys began to shake and sob too. And in the middle of them, with filthy body, matted hair, and unwiped nose, Ralph wept for the end of innocence, the darkness of man’s heart, and the fall through the air of the true, wise friend called Piggy.