{{Short description|Using concrete examples to teach computers behaviors}} In computer science, '''programming by example''' ('''PbE'''), also termed '''programming by demonstration''' or more generally as '''demonstrational programming''', is an end-user development technique for teaching a computer new behavior by demonstrating actions on concrete examples.<ref>[https://www.microsoft.com/en-us/research/publication/machine-learning-framework-programming-example/ A Machine Learning Framework for Programming by Example - Microsoft]</ref> The system records user actions and infers a generalized program that can be used on new examples.

PbE is intended to be easier to do than traditional computer programming, which generally requires learning and using a programming language. Many PbE systems have been developed as research prototypes, but few have found widespread real-world application. More recently, PbE has proved to be a useful paradigm for creating scientific work-flows. PbE is used in two independent clients for the BioMOBY protocol: [http://www.biomedcentral.com/1471-2105/8/208/abstract Seahawk] and [http://www.scfbm.org/content/1/1/4 Gbrowse moby].

Also the programming by demonstration (PbD) term has been mostly adopted by robotics researchers for teaching new behaviors to the robot through a physical demonstration of the task. The usual distinction in the literature between these terms is that in PbE the user gives a prototypica<nowiki/>l product of the computer execution, such as a row in the desired results of a query; while in PbD the user performs a sequence of actions that the computer must repeat, generalizing it to be used in different data sets. For final users, to automate a workflow in a complex tool (e.g. Photoshop), the most simple case of PbD is the macro recorder.

==See also== * Query by Example * Automated machine learning * Example-based machine translation * Inductive programming * Lapis (text editor), which allows simultaneous editing of similar items in multiple selections created by example * Programming by demonstration * Test-driven development<!-- example-driven software development -->

==References== {{Reflist}}

==External links== * [http://web.media.mit.edu/~lieber/PBE/ Henry Lieberman's page on Programming by Example] * [http://www.acypher.com/wwid/ Online copy of <u>Watch What I Do</u>, Allen Cypher's book on Programming by Demonstration] * [http://web.media.mit.edu/~lieber/Your-Wish/ Online copy of <u>Your Wish is My Command</u>, Henry Lieberman's sequel to <u>Watch What I Do</u>] * [http://www.dsmforum.org/events/DSVL01/carlson.pdf <u>A Visual Language for Data Mapping</u>, John Carlson's description of an Integrated Development Environment (IDE) that used Programming by Example (desktop objects) for data mapping, and an iconic language for recording operations]

{{Programming paradigms navbox}}

{{Authority control}}

Category:User interfaces Category:Programming paradigms Category:Machine learning

{{compu-prog-stub}} {{machine-learning-stub}}