Abstract
Programming by demonstration enables users to easily personalize their applications, automating repetitive tasks simply by executing a few examples. We formalize programming by demonstration as a machine learning problem: given the changes in the application state that result from the user's demonstrated actions, learn the general program that maps from one application state to the next. We present a methodology for learning in this space of complex functions. First we extend version spaces to learn arbitrary functions, not just concepts. Then we introduce the version space algebra, a method for composing simpler version spaces to construct more complex spaces. Finally, we apply our version space algebra to the text-editing domain and describe an implemented system called SMARTedit that learns repetitive text-editing procedures by example. We evaluate our approach by measuring the number of examples required for the system to learn a procedure thatworks on the remainder of examples, and by an informal user study measuring the effort users spend using our system versus performing the task by hand. The results show that SMARTedit is capable of generalizing correctly from as few as one or two examples, and that users generally save a significant amount of effort when completing tasks with SMARTedit's help.
Article PDF
Similar content being viewed by others
References
Agre, P., & Chapman, D. (1990). What are plans for? Robotics and Autonomous Systems, 6:1/2, 17–34.
Andreae, P. (1984). Constraint limited generalization: Acquiring procedures from examples. In Proceedings of the Fourth National Conference on Artificial Intelligence (pp. 6–10).
Ashish, N., & Knoblock, C. (1997). Semi-automatic wrapper generation for internet information sources. In Proceedings of the Second IFCIS International Conference on Cooperative Information Systems (pp. 160–169). Los Alamitos, CA.
Bauer, M., & Dengler, D. (1999). TrIAs: Trainable information assistants for cooperative problem solving. In Proceedings of the Third Annual Conference on Autonomous Agents (pp. 260–267).
Bauer, M., Dengler, D., & Paul, G. (2000). Instructible information agents for web mining. In Proceedings of the 2000 Conference on Intelligent User Interfaces.
Blumer, A., Ehrenfeucht, A., Haussler, D., & Warmuth, M. (1987). Occam's razor. Information Processing, 24:6, 377–380.
Charniak, E., & Goldman, R. (1991). A probablistic model of plan recognition. In Proceedings of the Ninth National Conference on Artificial Intelligence (Vol. 1, pp. 160–165).
Charniak, E.,& Goldman, R. P. (1993). A Bayesian model of plan recognition. Artificial Intelligence, 64:1, 53–79.
Cowie, J., & Lehnert, W. (1996). Information extraction. C. ACM, 39:1, 80–91.
Cypher, A. (Ed.). (1993). Watch What I Do: Programming by Demonstration. Cambridge, MA: MIT Press.
Etzioni, O., Hanks, S., Weld, D., Draper, D., Lesh, N., & Williamson, M. (1992). An approach to planning with incomplete information. In Proceedings of the Third International Conference on Principles of Knowledge Representation and Reasoning (pp. 115–125).
Halbert, D. C. (1993). SmallStar: Programming by demonstration in the desktop metaphor. In A. Cypher (Ed.), Watch What I Do: Programming by Demonstration (pp. 102–123). Cambridge, MA: MIT Press.
Haussler, D. (1988). Quantifying inductive bias. Artificial Intelligence, 36:2, 177–221.
Hirsh, H. (1991). Theoretical underpinnings of version spaces. In Proceedings of the Twelfth International Joint Conference on Artificial Intelligence (pp. 665–670).
Hirsh, H., Mishra, N., & Pitt, L. (1997). Version spaces without boundary sets. In Proceedings of the Fourteenth National Conference on Artificial Intelligence (pp. 491–496).
Hobbs, J. (1992). The generic information extraction system. In Proc. 4th Message Understanding Conf.
Kautz, H. A., & Allen, J. F. (1986). Generalized plan recognition. In Proceedings of the Fifth National Conference on Artificial Intelligence (pp. 32–37).
Kearns, M., & Vazirani, U. (1994). An Introduction to Computational Learning Theory. MIT.
Kushmerick, N. (2000). Wrapper induction: Efficiency and expressiveness. Artificial Intelligence, 118:1/2, 15–68.
Kushmerick, N., Weld, D., & Doorenbos, R. (1997). Wrapper induction for information extraction. In Proceedings of the Fifteenth International Joint Conference on Artificial Intelligence (pp. 729–737).
Langley, P., & Simon, H. A. (1995). Applications of machine learning and rule induction. Communications of the ACM, 38, 54–64.
Lau, T.,& Weld, D. S. (1999). Programming by demonstration: An inductive learning formulation. In Proceedings of the 1999 International Conference on Intelligent User Interfaces (IUI 99) (pp. 145–152). Redondo Beach, CA, USA.
Lesh, N. (1997). Adaptive goal recognition. In Proceedings of the Fifteenth International Joint Conference on Artificial Intelligence.
Lesh, N. (1998). Scalable and adaptive goal recognition. Ph.D. thesis, University of Washington.
Lesh, N., & Etzioni, O. (1995). A sound and fast goal recognizer. In Proceedings of the Fourteenth International Joint Conference on Artificial Intelligence (pp. 1704–1710).
Lesh, N., & Etzioni, O. (1996). Scaling up goal recognition. In Proceedings of the Fifth International Conference on Principles of Knowledge Representation and Reasoning (pp. 178–189).
Lesh, N., Rich, C., & Sidner, C. (1999). Using plan recognition in human-computer collaboration. In Proceedings of the Seventh Int. Conf. on User Modelling. Banff, Canada.
Lieberman, H. (1998). Integrating user interface agents with conventional applications. In Proceedings of the 2000 Conference on Intelligent User Interfaces (pp. 39–46). San Francisco, CA.
Lieberman, H. (Ed.). (2001). Your Wish is My Command: Giving Users the Power to Instruct their Software. Morgan Kaufmann.
Maes, P., & Kozierok, R. (1993). Learning interface agents. In Proceedings of AAAI-93 (pp. 459–465).
Masui, T., & Nakayama, K. (1994). Repeat and predict—Two keys to efficient text editing. In Conference on Human Factors in Computing Systems (CHI '94) (pp. 118–123).
Maulsby, D., & Witten, I. H. (1997). Cima: An interactive concept learning system for end-user applications. Applied Artificial Intelligence, 11, 653–671.
Mitchell, T. (1982). Generalization as search. Artificial Intelligence, 18, 203–226.
Mo, D. H. (1989). Learning text editing procedures from examples. Master's thesis, University of Calgary.
Muggleton, S. (Ed.). (1992). Inductive Logic Programming. London: Academic Press.
Muslea, I. (2000). RISE: Repository of online information sources used in information extraction tasks. Also available at http://www.isi.edu/~muslea/RISE/, retrieved on 10/4/2000.
Muslea, I., Minton, S., & Knoblock, C. A. (2000). Selective sampling with redundant views. In Proceedings of the Seventeenth National Conference on Artificial Intelligence (pp. 621–626).
Nix, R. P. (1985). Editing by example. ACMTransactions on Programming Languages and Systems, 7:4, 600–621.
Norton, S. W., & Hirsh, H. (1992). Classifier learning from noisy data as probabilistic evidence combination. In Proceedings of the Tenth National Conference on Artificial Intelligence (pp. 141–146). Menlo Park, CA.
Paynter, G. W. (2000). Automating iterative tasks with programming by demonstration. Ph.D. thesis, University of Waikato.
Pollack, M. (1990). Plans as complex mental attitudes. In P. Cohen, J. Morgan, & M. Pollack (Eds.), Intentions in Communication (pp. 77–101). Cambridge, MA: MIT Press.
Pynadath, D. V., & Wellman, M. P. (2000). Probabilistic state-dependent grammars for plan recognition. In Proceedings of the Conference on Uncertainty in Artificial Intelligence (UAI-2000) (pp. 507–514).
Rich, C.,& Sidner, C. (1997). Segmented interaction history in a collaborative agent. In Third Int. Conf. Intelligent User Interfaces (pp. 23–30).
Ruvini, J., & Dony, C. (2000). APE: Learning user's habits to automate repetitive tasks. In Proceedings of the 2000 Conference on Intelligent User Interfaces (pp. 229–232). New Orleans, LA.
Schlimmer, J., & Hermens, L. (1993). Software agents: Completing patterns and constructing user interfaces. J. Artificial Intelligence Research, 61–89.
Shavlik, J., & DeJong, G. (1987). An explanation-based approach to generalizing number. In Proceedings of IJCAI-87 (pp. 236–238).
Subramanian, D., & Feigenbaum, J. (1986). Factorization in experiment generation. In Proceedings of the Fifth National Conference on Artificial Intelligence (pp. 518–522). Philadelphia, PA.
Valiant, L. (1984). A theory of the learnable. C. ACM, 27:11, 1134–1142.
VanLehn, K., & Ball,W. (1987). A version space approach to learning context-free grammars. Machine Learning, 2, 39–74.
Vilain, M. (1990). Getting serious about parsing plans: A grammatical analysis of plan recognition. In Proceedings of the Eighth National Conference on Artificial Intelligence (pp. 190–197).
Weld, D. (1994). An introduction to least-commitment planning. Artificial Intellligence Magazine, 15:4, 27–61. Available at ftp://ftp.cs.washington.edu/pub/ai/.
Witten, I. H. (1995). Pbd systems: When will they ever learn? In Workshop on Programming by Demonstration, ML'95 (pp. 1–9). Tahoe City, CA.
Wolfman, S. A., Lau, T., Domingos, P., & Weld, D. S. (2001). Collaborative interfaces for learning tasks: SMARTedit talks back. In Proceedings of the 2001 Conference on Intelligent User Interfaces (pp. 167–174). Santa Fe, NM, USA.
Author information
Authors and Affiliations
Rights and permissions
About this article
Cite this article
Lau, T., Wolfman, S.A., Domingos, P. et al. Programming by Demonstration Using Version Space Algebra. Machine Learning 53, 111–156 (2003). https://doi.org/10.1023/A:1025671410623
Issue Date:
DOI: https://doi.org/10.1023/A:1025671410623