------------------ APE BETA RELEASE 3.0 for VisualWorks 3.0 (c) 1998 Jean-David RUVINI and Christophe DONY LIRMM Université Montpellier II / CNRS 161 rue Ada 34392 Montpellier Cedex 5, France ruvini@lirmm.fr Please send us an email or a postcard! ------------------ CAUTION: This is a Beta version software. This means that it is still in the debugging and testing phase, and may contain bugs. These bugs may crash your computer (or worse). Be sure you backup any essential data before working with it. This version of APE have been developed and tested in ObjectShare VisualWorks® Non-Commercial (Release 3.0 of May 8, 1998), on Microsoft® Windows 95. It has not been tested with other versions of VisualWorks. This file contains a APE manual (in plain ASCII format). Contents 1. Introduction 2. Installing 3. Using APE a. Activating the Agents b. Playing a suggestion c. Playing a suggestion action by action 4. Participating to the beta testing 5. APE menus 6. Troubleshooting a. APE agents slow down VisualWorks b. APE agents raise an exception 7. Management a. Installing APE agents and opening APE interface b. Inspecting the APE agents c. Checking the set of methods monitoring user actions d. Killing accidentally suspended processes 8. Related publications 9. Contacting the authors -------------------------------------------------------- 1. Introduction --------------- The APE project aims at providing personal assistants to users of interactive programming environments. APE is based on 3 software agents, the Tracer responsible for recording user's actions in a history called the trace, the Apprentice (a learning agent) that learns users habits, and the Assistant that accelerates and facilitates the programming tasks by automating the achievement of repetitive tasks in respect with work habits of the programmer. The Apprentice and the Assistant operate without explicit intervention of the user, and work in background of the environment. The Apprentice and the Assistant continuously observe the user. The Apprentice regularly learns user's habits and repetitive tasks, and the Assistant exploits what has been learnt to automatically propose to the user sequences of actions that the programmer might want to redo. The interactive selection of actions to be automated is based on what has been learnt by the Apprentice. More precisely, when the Assistant detects the beginning of a learnt sequence, it proposes to perform the end of the sequence. Sequences of actions selected by the Assistant are proposed to the user in a non-obtrusive way i.e. the user is free to ignore what the Assistant suggests in its specific window. A simple mouse-click on one of these suggestions automatically performs the related actions. APE is developed at LIRMM (Laboratory of Informatics, Robotics and Micro-Electronics of Montpellier France, http://www.lirmm.fr) by Jean-David Ruvini and Christophe Dony. 2. Installing ------------- Requirements: VisualWorks 3.0, unzip a - Read the LICENSE and the README.FIRST files. README.FIRST lists all the methods we have modified to monitor users actions in APE. b - Unzip APE-BETA3.0.ZIP . This will result in three install files and a "ape" directory containing the source code of APE. c - Run VisualWorks 3.0 . c - In your VisualWorks environment, file in (Tools->File List) the "xxx-install.st file" (xxx corresponds to your platform MacOs, Unix or Microsoft Window). This will open APE user interface. d - Save the image with a new name (File->Save as...). 3. Using APE ------------ a. Activating the Agents To activate the agents click the "Watch" button in the "Ape Agents" window. To de-activate the agents click the "Sleep" button. When activated the Tracer records all user's actions, the Apprentice regularly learn user's habits and the Assistant constantly try to anticipate user's actions b. Playing a suggestion To play a suggestion of the Assistant, just click on it in the "Assistant" window. The Assistant will then automatically perform the related actions. One particularity of APE is that the APE agents are able to assist programmers in the writing of repetitive pieces of code, thanks to "template methods". If the user creates 2 methods sharing in common a certain amount of their respective code, the Apprentice builds a template method. A template is constituted of the common code of the 2 methods and symbols "#" for their differences. Example: Suppose the user has created the 2 following methods = another ^size = another size = another ^color = another color The Apprentice will build the template = another ^#### = another #### To use such a template, the user simply has to replace symbols "#" with correct code. When suggesting a template, the Apprentice displays the message "Insert template". Just click on it to insert the template in the code window of your browser. c. Playing a suggestion action by action To play only the first action of a suggestion, hold down "Control" key while mouse-clicking on the suggestion in the Assistant window. 4. Participating to the beta testing ------------------------------------ The beta phase of software design exposes a new product, which has just emerged from in-house (alpha) testing, to a large number of real people and real usage, in order to get last bugs out. You can participate to the beta test of the APE software. What do you have to do? Beta-testing means two things : a. of course report bugs or wrong behavior b. send us session traces. A trace is a set of all actions a programmer has performed while using the environment. Traces are input data for the learning assistant and we desperately need original ones (others than ours). Traces can be saved simply with an item menu in the assistant window. How? Please follow the below procedure to give us your feedback. You just have to: a. save your trace (Tracer->Save trace as...), b. fill in the below form, c. send your trace and the form to ruvini@lirmm.fr All informations you provide will remain confidential and will only be used for academic research purpose within the LIRMM (Laboratory of Informatics, Robotics and Micro-Electronics, University of Montpellier , France, http://www.lirmm.fr) The following form can be found through the "Help -> Beta test" menu command in the "APE agents" window" ==================== BETA TESTER FORM a. Email address: b. What interest do you have in VisualWorks? Work, education, research, etc. c. What is your skill level with VisualWorks? Beginner, expert, etc. d. Bugs or areas of difficulties: Please describe as precisely as possible the problem you have encountered (name of the exception if any, last action executed, etc.). e. Please tell us about your interests, and any additional comments and information you may have: Thank you for your support. 5. APE menus ------------ * The Tracer menu commands: Load trace: To load a trace in the Tracer agent. Save trace as...: The current trace can be saved. Traces are saved in the current directory with ".tra" extension, and the trace is EMPTIED. Empty trace: Not available in this beta version. To empty the trace in beta just save it (see above). Save the trace (to empty it) whenever your image file becomes to large, or VisualWorks is slowed down by APE. * The Apprentice menu commands: Learn now!: to command the Apprentice to learn. Preferences: Sort term/Long term learning: To be fully adapted to users habits, the Apprentice combines long term learning with short term learning. Short term learning occurs frequently but the Apprentice searches for new habits only in a few of the last actions of the user. Conversely, long term learning occurs less frequently but the Apprentice consider the whole trace. You can change short term and long term learning frequencies (set to 0 to preclude learning). Do NOT hesitate to change these frequencies if you experience that the Apprentice learns (and the Assistant suggests) few of your habits. Template methods learning: This radio button allows to specify the frequency of template method learning. The Apprentice can try to learn new template each time the programmer accepts a new method ("all the time" activated) or only at short term learning ("at short term learning" activated). Template similarity: The Apprentice builds a template method when the number of tokens 2 methods share in common exceeds a certain threshold. This slider allows to set this threshold. Forget all: to empty the Apprentice (habit) knowledge base. * The Assistant menu commands: Open: To open an Assistant window. * The Help menu commands: Beta test: whenever you experience a bug, please give us feedback. Follow the instruction provided in this window. Help: this file. 6. Troubleshooting ------------------ a. APE agents slow down VisualWorks This may happen when the agents have to handle large traces. To solve the problem first choose "Forget all" in the Apprentice menu and save the trace. b. APE agents raise an exception Just close the exception window. If "Watch" was activated, activate it again. If the agents still raise an exception, choose "Forget all" in the Apprentice menu and/or empty the trace (Tracer menu). 7. Management ------------- a. doIt to install APE agents and open APE interface ApeUI install b. To inspect the APE agents: TracerAgent inspect. ApprenticeAgent inspect. AssistantAgent inspect c. To check the set of methods monitoring user actions Just browse the parcel named 'APE-Spied.pcl' d. To kill accidentally suspended processes Process allInstancesDo: [ :p | p suspendedContext isNil ifFalse: [(p suspendedContext sender receiver isKindOf: Apprentice) ifTrue: [p terminate]]]. ApprenticeAgent busy signal 8. Related publications ----------------------- Main publications related to the APE project are: J-D Ruvini and C. Dony "APE : Learning User's Habits to Automate Repetitive Tasks". In Proceedings of ACM International Conference on Intelligent User Interfaces (IUI2000), pages 229-232, 2000. Jean-David Ruvini and Christophe Dony "Learning Users Habits: The APE Project". In Proceedings of IJCAI'99 Workshop on Learning About Users, pages 65-73, 1999. J-D Ruvini and C. Fagot, "IBHYS: a new approach to learn users habits". In Proceedings of 10Th Int. Conf. on Tools with Artificial Intelligence. IEEE Computer Society Press, 1998. J-D. Ruvini and C. Dony and P. Reitz, "The Apprentice and the Assistant: two interface agents for Smalltalk". In Proceedings of PAAM98. The Practical Application Company Ltd., 1998. 9. Contacting the Authors ------------------------- For further information or to receive update informations contact Jean-David Ruvini ruvini@lirmm.fr. Suggestions, comments and feedback on what we have done so far are welcome. Thank you for your support! J-D Ruvini ruvini@lirmm.fr