ACT-Droid is a tool for directly connecting ACT-R with Android applications on smartphones or tablets. The advantage of this tool is that no prototyping of the application is needed. This tool is especially useful to evaluate applications according to usability by using general modeling approaches. You can but do not have to use ACT-Droid with the ACT-Touch extension by Frank Tamborello (revision 14) in order to replace the default ACT-R motor commands like "click-mouse" with touch commands like "tap" and "swipe". To use them set *act-touch* t. If you have any questions or problems, please contact Lisa-Madeleine Doerr (lisa-madeleine.m.doerrcampus.tu-berlin.de) or Nele Russwinkel (nele.russwinkeltu-berlin.de) ################ run a model ################ Prerequisites to run a model: - the modified app on real Android smartphone (not emulator) ->instructions how to modify the app follow in the next section - download and install one of the following Lisp environments: LispWorks, CCL, Clisp or Allegro - download ACT-R 6, 7 or 7.0.8 (not standalone) - PC and smartphone are in the same network - download model-interface.lisp (included in folder: actr-files) 1. insert the following code in your model file (or use our demo model first): ;;------------------------- global parameters ---------------------------------- ;;Network settings (defparameter *ip* "192.168.???.???") (defparameter *port* "1231") ;;decide whether to use touch or mouse commands (defparameter *act-touch* t) ;;DEBUG - print out nearly everything is possible? (defparameter *debug* nil) ;;print visicon after every proc-display? (defparameter *pv* nil) ;;Network available? (defparameter *net* t) ;; run model ?? (setf *actr-enabled-p* t) ;; attention pointer history size (defparameter *point-list-size* 4) ;; attention pointer draw lines (defparameter *attention-lines* 2) ;; attention pointer log into file (defparameter *log-attention* nil) ;; attentionlog filename (defparameter *attention-filename* "attention.eye") ;; schedule prog-display? (defparameter *schedule* nil) ;; update time (defparameter *schedule-time* 0.2) ;; cycle based simulation (defparameter *cycle-based* nil) ;; maximum run time; enacted should the model happen to not reach the desired end (defparameter *max-runtime* 20) (defparameter *real-time* t) ;; load the java device; the path to the model-interface.lisp file must be specified here: (load "C:\\Users\\your\\path\\to\\the\\model-interface.lisp") ;Windows ;(load "/home/user/your/path/to/the/model-interface.lisp") ;linux ;; if enabled: load the act-touch extension; the path to the act-touch.lisp file must be specified here: (if *act-touch* (load "~/Arbeit/Apps/act-droid/actr-files/act-touch.lisp")) ;;------------------------- end global parameters ------------------------------- 2. In the inserted code or the demo model, change the device path to your downloaded model-interface.lisp and the IP address to that of your smartphone. To get the IP you can go to Settings -> About the Phone -> status. (Hint: If you can, change the settings of the router, such that the smartphone always gets the same IP address) 3. start ACT-R and load the model, as usual when not using the ACT-R standalone a) start the lisp environment b) load your ACT-R version into lisp c) type (run-environment) in the lisp console d) load the model 4. close the modified app on the smartphone if it is already open 5. open the modified app on the smartphone 6. type (do-experiment) in the lisp console to start the model 7. repeat step 4,5 and 6 as often as you want 8. type (stop-environment) in the lisp console when you are done working. This is important when not using the standalone version. ################ modification of the app ################ If you did not write the app yourself, maybe the programmer can do this for you. Prerequisites for modifying the app: - possibilty to compile and install Android code, eg. Android studio - source code of the app - download ACT-Droid java classes (included in folder: java_actdroid) 1. insert our package "tub.lispcom" into your app, eg. by copying the tub folder to the app\src\main\java folder of your Android Studio project or If you want to use git (subtree) or maintain the file structure for some other reason and use android-studio: add the sourceSet in app\build.gradle example if the act-droid folder is in your project folder: android { ... sourceSets { main.java.srcDirs += '../act-droid' } } 2. add in the first displayed activity a) add the import: import tub.lispcom.Lispcom; b) add this line as a field: public static Lispcom lispcom = null; c) add in onResume(): if( lispcom == null ) { lispcom = new Lispcom(1231); lispcom.start(); lispcom.setActivity(this); } 3. add the following line every time the activity changes: lispcom.setActivity(newActivity); 4. In tub.lispcom.gui.Component in update_rec in the try block you can add more cases for views like our Drawview, if needed or change the behaviour of the ones already in there. You might want to add a method like getText() to self-created views. But mind the order! Every CheckBox is also a Button, every Button is also a TextView. So insert your descriptions, such that the first are more specialized and the last are more general. 5. install the app on a smartphone. Using Android Studio this can be done by running it on the smartphone. ################ License ################ Copyright (C) 2016, Nele Russwinkel - nele.russwinkeltu-berlin.de lispcom is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. lispcom is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A copy of the GNU General Public License can be found at .