A.I. Artificial Intelligence

In the late 21st century, global warming has flooded the coastlines, wiping out coastal cities (such as Amsterdam, Venice, and New York City) and drastically reducing the human population. There is a new class of robots called Mecha, advanced humanoids capable of emulating thoughts and emotions.
David (Haley Joel Osment), a prototype model created by Cybertronics of New Jersey, is designed to resemble a human child and to display love for its human owners. They test their creation with one of their employees, Henry Swinton (Sam Robards), and his wife Monica (Frances O'Connor). The Swintons' son, Martin (Jake Thomas), had been placed in suspended animation until a cure could be found for his rare disease. Initially frightened of David, Monica eventually warms up enough to him to activate his imprinting protocol, which irreversibly causes David to have an enduring childlike love for her. He is also befriended by Teddy (Jack Angel), a robotic teddy bear, who takes it upon himself to care for David's well-being.
A cure is found for Martin and he is brought home; as he recovers, it becomes clear he does not want a sibling and soon makes moves to cause issues for David. First, he attempts to make Teddy choose whom he likes more. He then makes David promise to do something and in return Martin will tell Monica that he loves his new "brother", making her love him more. The promise David makes is to go to Monica in the middle of the night and cut off a lock of her hair. This upsets the parents, particularly Henry, who fears that the scissors are a weapon, and warns Monica that a robot programmed to love may also be able to hate.
At a pool party, one of Martin's friends unintentionally activates David's self-protection programming by poking him with a knife. David grabs Martin, apparently for protection, but they both fall into the pool. David sinks to the bottom while still clinging to Martin. Martin is saved from drowning, but Henry mistakes David's fear during the pool incident as hate for Martin.
Henry persuades Monica to return David to Cybertronics, where he will be destroyed. However, Monica cannot bring herself to do this and, instead, tearfully abandons David in the forest (with Teddy) to hide as an unregistered Mecha.
David is captured for an anti-Mecha "Flesh Fair", an event where obsolete and unlicensed Mecha are destroyed in front of cheering crowds. David is nearly killed, but the crowd is swayed by his fear (since Mecha do not plea for their lives) into believing he is human and he escapes with Gigolo Joe (Jude Law), a male prostitute Mecha on the run after being framed for the murder of a client by the client's husband.
The two set out to find the Blue Fairy, who David remembers from the story The Adventures of Pinocchio. He is convinced that the Blue Fairy will transform him into a human boy, allowing Monica to love him and take him home.
Joe and David make their way to Rouge City, a Las Vegas-esque resort. Information from a holographic answer engine called "Dr. Know" (Robin Williams) eventually leads them to the top of Rockefeller Center in the flooded ruins of Manhattan. There, David meets an identical copy of himself and, believing he is not special, becomes filled with anger and destroys the copy Mecha. David then meets his human creator, Professor Allen Hobby (William Hurt), who excitedly tells David that finding him was a test, which has demonstrated the reality of his love and desire. However, David learns that he is the namesake and image of Professor Hobby's deceased son and that many copies of David, along with female versions called Darlene, are already being manufactured.
Sadly realizing that he is not unique, a disheartened David attempts to commit suicide by falling from a ledge into the ocean, but Joe rescues him with their stolen amphibicopter. David tells Joe he saw the Blue Fairy underwater and wants to go down to her. At that moment, Joe is captured by the authorities with the use of an electromagnet, but he sets the amphibicopter on submerge. David and Teddy take it to the fairy, which turns out to be a statue from a submerged attraction at Coney Island. Teddy and David become trapped when the Wonder Wheel falls on their vehicle. Believing the Blue Fairy to be real, David asks to be turned into a real boy, repeating his wish without an end, until the ocean freezes in another ice age and his internal power source drains away.
Two thousand years later, humans are extinct and Manhattan is buried under several hundred feet of glacial ice. The now highly advanced Mecha have evolved into an intelligent, silicon-based form. On their project to study humansâbelieving it was the key to understanding the meaning of existenceâthey find David and Teddy and discover they are original Mecha who knew living humans, making the pair very special and unique.
David is revived and walks to the frozen Blue Fairy statue, which cracks and collapses as he touches it. Having downloaded and comprehended his memories, the advanced Mecha use these to reconstruct the Swinton home and explain to David via an interactive image of the Blue Fairy (Meryl Streep) that it is impossible to make him human. However, at David's insistence, they recreate Monica from DNA in the lock of her hair, which Teddy had saved. One of the Mecha warns David that the clone can live for only a single day and that the process cannot be repeated. The next morning, David is reunited with Monica and spends the happiest day of his life with her and Teddy. Monica tells David that she loves him and has always loved him as she drifts to sleep for the last time. David lies down next to her, closes his eyes and goes "to that place where dreams are born" (in fact turns off, being exhausted and at the end of his technical lifetime). Teddy climbs onto the bed and watches as David and Monica lie peacefully together.

Question: How does David attempt suicide?
Answer: Falling from a ledge