It may seem like humanity has been taking a lot of hits from artificial intelligence lately — from the AI that recently defeated world champion Lee Sedol in the game of Go, to the AI that consistently beats us on "Jeopardy," to the AI that is currently out-trumping Donald Trump on Twitter.

Artificial intelligence can help make humanity better, not just by winning games or driving cars, but also by addressing some of the not-so-great aspects of human nature.

But it’s not all doom and gloom for humanity. In fact, building smarter AI means we’re getting smarter ourselves. Take Fan Hui, the European champion who lost five matches of Go earlier this year to the same AI Lee Sedol played against last month. When Fan Hui first played the AlphaGo AI, he was ranked 633rd in the world. Now he is ranked in the 300s. Studying the AI’s game inspired Fan Hui to change his game, and ultimately made him a better player. Extend that to the real world and you’ll recognize the potential for AI to teach us to be better drivers, better teachers, better writers and overall better people.

Today, AI is pervasive in many of our daily routines, from shopping online to driving cars to organizing our photos. AI is not only more efficient, but often tackles problems in new and interesting ways that differ from the established norms that human experts have developed.

As AI continues to get even smarter, we’ll see computer "intuition" helping with even more real-world problems — problems that we, as humans, have a tough time solving precisely because we’re human. Here are a few big issues we’re starting to address right now in the budding field of visual-recognition AI:

Racism, sexism and discrimination

Diversity in tech has been a big issue these days, with studies showing that the job market and workplace have a cultural bias against females and minorities. To combat an enormous social problem, we first have to document and understand how and when discrimination occurs, and raise awareness about the issue.

Some social media companies are using visual-recognition AI to do just that. A social network for young professionals automatically analyzes user-uploaded photos to see if there is a correlation between traits that aren’t listed in users’ text profiles (e.g., skin color, gender, weight, etc.) and the number of recruiters who pass over them. By understanding and proving these linkages, the company is able to help raise awareness and consciously combat these subconscious biases.

Online harassment

The Internet is not a civilized place. It is a place where trolls roam free, hiding behind relative anonymity and the safety of impersonal interactions to justify online harassment, threats and general bad behavior. And until online trolls and bullies reform, it’s up to AI to help make the Internet a safer space for both free speech and human beings.

A popular dating app on the market uses AI technology to filter out nudity and potentially offensive images from its users’ photos. Say goodbye to unsolicited dick pics, ladies! The neat thing about AI is you don’t have to tell it what’s "offensive" — the algorithm learns from examples and makes determinations based on feedback from users. So if enough women flag men wearing fedoras as offensive, the AI learns to recognize that concept in the future.

Black market

With the black-market size estimated at trillions of dollars a year, and the fact that it’s easier to buy a gun than a book in some places, the subject of how we keep society safe has been top of mind lately.

It will take thoughtful and ethical humans to create computer understanding that can elevate the rest of humanity.

For marketplaces on the internet, AI is playing a large role in moderating what users put up for sale — whether it’s guns, drugs, live exotic animals or other illegal items. Several online auction sites use AI to identify when users upload photos of contraband, and prevent them from making a listing. This filtering has a huge impact, because people tend to upload pictures of the real items, but list inaccurate and innocuous text descriptions like "vase of flowers" to avoid traditional text-moderation filters.

These examples are proof that AI can help make humanity better, not just by winning games or driving cars, but also by addressing some of the not-so-great aspects of human nature. But what people often forget is that AI is only able to operate in response to instructions and examples provided by humans, at least for now. So it will take thoughtful and ethical humans to create computer understanding that can elevate the rest of humanity. The choice is ours to make between planting the seeds of the robot apocalypse or the robot renaissance.

Matthew Zeiler is the founder and CEO of Clarifai, an artificial intelligence company that excels in visual recognition, solving real-world problems for businesses and developers alike. Matthew received a PhD in machine learning and image recognition with the pioneers of deep learning and convolutional neural networks. Reach him @mattzeiler.