SlideShare a Scribd company logo
1 of 22
Self-Programming
Artificial Intelligence
Computer programs that write their own
programs.
Sponsored By
Kory Becker http://primaryobjects.com
September 2017
Hello World, Kory Becker
Software Developer at Bloomberg LP
Author of "Building Voice-Enabled Apps with Alexa",
2017 Bleeding Edge Press
Web Apps, Artificial Intelligence, Data Science
https://linkedin.com/in/korybecker
AI !== Machine Learning
Logical AI, Symbolic, Knowledge-based
Pattern Recognition, Representation
Inference, Common Sense, Planning
Heuristics, Ontology, Artificial Life, Genetic
Infinite Monkey Theorem
Profit!
Program Synthesis
Automatically construct a computer
program that satisfies a specific goal.
Genetic Algorithms
Evolutionary Computation
Writing Code
Turing complete
8 instructions, 1 byte each: > < + - . , [ ]
Easy to build an interpreter and expand
https://goo.gl/GnzaQe
Generating Programs
Genome encoded as array of doubles
Fitness based upon program output
Roulette selection, crossover, mutation
Constructing a Genome
0.1 0.6 0.3 0.6 0.7 0.2 0.0 0.9 0.1 0.2
[ + - + , ] . > [ ]
Crossover & Mutation
[ + - + , > > < . .
[ + - + , ] . > [ ]
0.9 0.8
The Strong Survive
, ] + > ] < . . - ]
This program prints 2 characters from input
, [ + > ] < . . - +
Results?
hello world reversing a string
addition
subtraction user input
fibonaccibottles of beer
multiplication
Hello <user>
Generated in 1 minute
Hello <user>
Generated in 29 minutes
Hello <user>
Generated in 30 minutes
Outputting Text
Generated in 10 hours
Bottles of Beer on the
Wall
Generated in 33 minutes
"hello"
+-+-+>-<[++++>+++++<+<>++]>[-[---
.--[[-.++++[+++..].]]]]
Generated in 29 minutes
Addition
,>,-[-<+>]<+.
Generated in 45 minutes
Fibonacci
,>,$[!>--$<<a>>]4]+,,-[-<+>]<+.$@
Generated in 7 hours
Future
Expand instruction set
Sub-modules to compose larger programs
Developers design. Computers write code.
Thanks
Generated in 2.5 hours
Conclusion
Using Artificial Intelligence to Write
Self-Modifying/Improving Programs
http://primaryobjects.com/cms/article149
Kory Becker, 2017

More Related Content

Similar to Self Programming Artificial Intelligence - Lightning Talk

iOS-iPhone documentation
iOS-iPhone documentationiOS-iPhone documentation
iOS-iPhone documentation
Raj Dubey
 
Is AI More Artificial Than Intelligent? Is Wikipedia Better Than AI Chatbots ...
Is AI More Artificial Than Intelligent? Is Wikipedia Better Than AI Chatbots ...Is AI More Artificial Than Intelligent? Is Wikipedia Better Than AI Chatbots ...
Is AI More Artificial Than Intelligent? Is Wikipedia Better Than AI Chatbots ...
Reflections on Morality, Philosophy, and History
 
Computer Vision and Text Analytics Using Azure Cognitive Services
Computer Vision and Text Analytics Using Azure Cognitive ServicesComputer Vision and Text Analytics Using Azure Cognitive Services
Computer Vision and Text Analytics Using Azure Cognitive Services
Umme Rubaiyat Chowdhury
 

Similar to Self Programming Artificial Intelligence - Lightning Talk (20)

Shift AI 2020: Using AI for automatic synthesis | Boris Cergol (Comtrade Digi...
Shift AI 2020: Using AI for automatic synthesis | Boris Cergol (Comtrade Digi...Shift AI 2020: Using AI for automatic synthesis | Boris Cergol (Comtrade Digi...
Shift AI 2020: Using AI for automatic synthesis | Boris Cergol (Comtrade Digi...
 
Microsoft Cognitive Services 入門&最新情報
Microsoft Cognitive Services 入門&最新情報Microsoft Cognitive Services 入門&最新情報
Microsoft Cognitive Services 入門&最新情報
 
Understanding Generative AI in Software Development
Understanding Generative AI in Software DevelopmentUnderstanding Generative AI in Software Development
Understanding Generative AI in Software Development
 
Essential Tools for Developing Amazing iOS Mobile Apps.pdf
Essential Tools for Developing Amazing iOS Mobile Apps.pdfEssential Tools for Developing Amazing iOS Mobile Apps.pdf
Essential Tools for Developing Amazing iOS Mobile Apps.pdf
 
20160813 102-59-kim youngwook
20160813 102-59-kim youngwook20160813 102-59-kim youngwook
20160813 102-59-kim youngwook
 
What is .NET Chinese ver
What is .NET Chinese verWhat is .NET Chinese ver
What is .NET Chinese ver
 
iOS application development
iOS application developmentiOS application development
iOS application development
 
Light Side of Microsoft: AI and research projects you never heard of before
Light Side of Microsoft: AI and research projects you never heard of beforeLight Side of Microsoft: AI and research projects you never heard of before
Light Side of Microsoft: AI and research projects you never heard of before
 
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile FrameworkBuilding a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
Building a Simple Mobile-optimized Web App Using the jQuery Mobile Framework
 
codex (1).ppt
codex (1).pptcodex (1).ppt
codex (1).ppt
 
2013.02.26 Intel Overview
2013.02.26 Intel Overview2013.02.26 Intel Overview
2013.02.26 Intel Overview
 
How Do I Pick the Best Platform for an iOS App?
How Do I Pick the Best Platform for an iOS App?How Do I Pick the Best Platform for an iOS App?
How Do I Pick the Best Platform for an iOS App?
 
iOS-iPhone documentation
iOS-iPhone documentationiOS-iPhone documentation
iOS-iPhone documentation
 
Microsoft Speech Technologies for Developers
Microsoft Speech Technologies for DevelopersMicrosoft Speech Technologies for Developers
Microsoft Speech Technologies for Developers
 
Azure Meetup: Getting Started Cognitive Services
Azure Meetup: Getting Started Cognitive ServicesAzure Meetup: Getting Started Cognitive Services
Azure Meetup: Getting Started Cognitive Services
 
Intelligent ChatBot
Intelligent ChatBotIntelligent ChatBot
Intelligent ChatBot
 
Analytical Superpower June 2023.pdf
Analytical Superpower June 2023.pdfAnalytical Superpower June 2023.pdf
Analytical Superpower June 2023.pdf
 
Intelligent Assistant with Microsoft BotFramework
Intelligent Assistant with Microsoft BotFrameworkIntelligent Assistant with Microsoft BotFramework
Intelligent Assistant with Microsoft BotFramework
 
Is AI More Artificial Than Intelligent? Is Wikipedia Better Than AI Chatbots ...
Is AI More Artificial Than Intelligent? Is Wikipedia Better Than AI Chatbots ...Is AI More Artificial Than Intelligent? Is Wikipedia Better Than AI Chatbots ...
Is AI More Artificial Than Intelligent? Is Wikipedia Better Than AI Chatbots ...
 
Computer Vision and Text Analytics Using Azure Cognitive Services
Computer Vision and Text Analytics Using Azure Cognitive ServicesComputer Vision and Text Analytics Using Azure Cognitive Services
Computer Vision and Text Analytics Using Azure Cognitive Services
 

More from Kory Becker

More from Kory Becker (12)

Intelligent Heuristics for the Game Isolation
Intelligent Heuristics  for the Game IsolationIntelligent Heuristics  for the Game Isolation
Intelligent Heuristics for the Game Isolation
 
Tips for Submitting a Proposal to Grace Hopper GHC 2020
Tips for Submitting a Proposal to Grace Hopper GHC 2020Tips for Submitting a Proposal to Grace Hopper GHC 2020
Tips for Submitting a Proposal to Grace Hopper GHC 2020
 
Grace Hopper 2019 Quantum Computing Recap
Grace Hopper 2019 Quantum Computing RecapGrace Hopper 2019 Quantum Computing Recap
Grace Hopper 2019 Quantum Computing Recap
 
An Introduction to Quantum Computing - Hopper X1 NYC 2019
An Introduction to Quantum Computing - Hopper X1 NYC 2019An Introduction to Quantum Computing - Hopper X1 NYC 2019
An Introduction to Quantum Computing - Hopper X1 NYC 2019
 
Self-Programming Artificial Intelligence Grace Hopper GHC 2018 GHC18
Self-Programming Artificial Intelligence Grace Hopper GHC 2018 GHC18Self-Programming Artificial Intelligence Grace Hopper GHC 2018 GHC18
Self-Programming Artificial Intelligence Grace Hopper GHC 2018 GHC18
 
2017 CodeFest Wrap-up Presentation
2017 CodeFest Wrap-up Presentation2017 CodeFest Wrap-up Presentation
2017 CodeFest Wrap-up Presentation
 
Discovering Trending Topics in News - 2017 Edition
Discovering Trending Topics in News - 2017 EditionDiscovering Trending Topics in News - 2017 Edition
Discovering Trending Topics in News - 2017 Edition
 
Machine Learning in a Flash (Extended Edition 2): An Introduction to Neural N...
Machine Learning in a Flash (Extended Edition 2): An Introduction to Neural N...Machine Learning in a Flash (Extended Edition 2): An Introduction to Neural N...
Machine Learning in a Flash (Extended Edition 2): An Introduction to Neural N...
 
Machine Learning in a Flash (Extended Edition): An Introduction to Natural La...
Machine Learning in a Flash (Extended Edition): An Introduction to Natural La...Machine Learning in a Flash (Extended Edition): An Introduction to Natural La...
Machine Learning in a Flash (Extended Edition): An Introduction to Natural La...
 
Machine Learning in a Flash: An Introduction to Natural Language Processing
Machine Learning in a Flash: An Introduction to Natural Language ProcessingMachine Learning in a Flash: An Introduction to Natural Language Processing
Machine Learning in a Flash: An Introduction to Natural Language Processing
 
IBM Watson Concept Insights
IBM Watson Concept InsightsIBM Watson Concept Insights
IBM Watson Concept Insights
 
Detecting a Hacked Tweet with Machine Learning (5 Minute Presentation)
Detecting a Hacked Tweet with Machine Learning (5 Minute Presentation)Detecting a Hacked Tweet with Machine Learning (5 Minute Presentation)
Detecting a Hacked Tweet with Machine Learning (5 Minute Presentation)
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

Self Programming Artificial Intelligence - Lightning Talk

Editor's Notes

  1. Hi everyone! I'm really excited to be presenting one of my favorite AI topics on self-programming artificial intelligence. I'd like to start this off with a simple question. Is it possible for a computer program to write its own programs?
  2. Before I get started, let me quickly introduce myself. My name is Kory Becker. I'm a software developer at Bloomberg LP. I design web applications and web services, although my core interest in computing has always been artificial intelligence and data science. I'm also the author of the book, "Building Voice-Enabled Apps with Alexa" http://shop.oreilly.com/product/9781939902443.do, which is my first published book. In fact, the final release was just published this year! Wow! If you're interested in conversational UI, chat bots, or building your first Amazon Alexa app, take a look at my book online at Safari Books or O'Reilly.
  3. I want to briefly start this presentation off by just clearing up some media hype that has been steadily growing over the past year or two, surrounding what AI is and all of the amazing things it's going to do. The news like to say things like "chatbots are going to take over everyone's jobs, machine learning is changing everything, etc". Not to belittle machine learning, as it truly is an amazing branch of AI that has made significant leaps and bounds in accuracy over the past few years (largely due to massive online datasets, increased computing speed, and deep learning). However, AI is not just machine learning. There is a lot more to it! AI encompasses many different branches. There is logical AI, which deals with representing knowledge as logical sentences. There is Symbolic AI (also called Classical AI), which uses human-readable representations of problems (my STRIPS planning library is an example of this). There is knowledge-based AI like the Cyc database, pattern recognition such as image recognition of cats, dogs, and the CIFAR dataset. There is also AI planning (see http://stripsfiddle.herokuapp.com for an example of this, where I demonstrate AI for solving Starcraft build orders! How cool is that?). There are heuristics like A* Search. But the focus of this presentation is the last topic on the slide, which is genetic algorithms, also called evolutionary computation.
  4. So, why genetic algorithms? Genetic algorithms are a branch of AI that deal with simulating evolution among thousands of different genomes to produce the best offspring, most fit to solve a particular task. In the case of self-programming AI, this task is writing its own computer programs! I like to compare the overall idea to the Infinite Monkey Theorem. The idea is that if you have a hundred monkeys banging on a hundred typewriters, given enough time, they'll produce a written work by Shakespeare. I know this seems crazy, but consider it. The monkeys are hitting random keys, of course. However, at some point in an infinite time space, they'll manage to randomly type a real word. Perhaps, a real sentence. And at some point in infinite time, a complete book! Now, consider this difference. What if you gave a banana to the monkeys each time they typed a correct key? Perhaps, you could guide the random key banging into a more structured approach, effectively training the monkeys to write out a work by Shakespeare. This is exactly the idea behind program synthesis.
  5. Program synthesis is a more formal naming for self-programming AI. It's simply computer programs that can automatically generate their own computer programs for a specific goal. Program synthesis can be done in different ways, such as neural networks, deep learning, and as we're about to see, genetic algorithms.
  6. In the case of using genetic algorithms for an AI to write its own computer programs, a programming language that is easy enough for the AI to manipulate is required. The selected programming language is a very strange and esoteric one. It's very difficult for humans to understand and use. However, it's simple nature makes it perfect for a self-programming AI. First, the programming language is Turing complete. This means that it's theoretically capable of solving any problem in the universe. That means, the AI would be theoretically capable of writing its own computer programs for any problem in the universe. Next, it consists of just 8 instructions. This makes it easy for a genetic algorithm to manipulate, as the number of possible instructions are kept to a minimum. Third, it's easy to build an interpreter for and to expand upon.
  7. To generate a program, we first create a genome. The genome is encoded as an array of doubles (or floating point values). Each value corresponds to a programming instruction in the language. The genomes are converted to a program, executed, and their fitness is ranked according to the output of each program. The closer a generated program comes to solving the task, the more likely it is to continue to the next generation. At each generation epoch, we use roulette selection, crossover, and mutation to create child programs that are slightly different (and hopefully better!) than their parents.
  8. Here is an example of constructing a genome from an array of doubles. Notice how each value maps to a specific instruction in the programming language. Initially, these values are all random and the programs won't do much except throw errors and fail. Most likely immediately. However, one or two are bound to run and do, at least, something! It's these that move on to produce offspring with code that gets better and better.
  9. To create offspring, a parent genome contributes part of its genome to the child. This is called crossover, and you can see it in action in the slide above. We can also randomly apply a little mutation, which slightly modifies the value of a particular gene, resulting in a change to the resulting programming instruction. These changes copy forward potentially beneficial parts of the parent and mutate certain instructions, which may or may not, end up making the child programs more fit.
  10. Finally, the resulting programs that are generated get ranked according to how well they performed. You can see in this slide how the top program fails, and is removed from the pool of genomes. However, the bottom program succeeded and is carried forward to produce child programs. It just so happens, the bottom program is a valid running program that takes 2 bytes for input and prints them out.
  11. Now that we're all experts on genetic algorithms and evolutionary computational AI, let's see what the project has produced. The AI has been able to successfully generate programs for "hello world", reversing a string, addition, subtraction, multiplication, reading input from the user, if/then conditions, printing the fibonacci sequence, and even writing a program to output the "Bottles of Beer on the Wall" song!
  12. It's pretty amazing how the AI was able to produce these programs, and more! There is certainly some potential in what could be done. I've been writing software for many years and I've always felt that it's just something that humans shouldn't be doing. Computers should be writing the code. Humans should be designing the programs. Consider a future where humans create "lego blocks" of program designs. They give these designs to the computer, which then writes the programs to make these "lego blocks" real software. The human then designs a higher level problem, where the computer can then utilize the building blocks as sub-modules to create even more complex programs, generating software for web applications, databases, games, and much more.
  13. If you'd like to learn more about my self-programming AI research, check out my blog at http://primaryobjects.com/cms/article149. I have a full write-up of the details behind the AI, example programs that it's successfully produced, and ideas towards future work. It's really fascinating stuff! Also, be sure to check out my book, "Building Voice-Enabled Apps for Alexa" on Safari Books. Thank you!