sclass AI_WhatDidYouDoTodayBot > AttractorBot { Long now; S name; run { say("What did you do today?"); } // CONFIG class SetNameAttractor > Attractor { S name; public bool matches(S s) { new Matches m; if "My name is ..." ret true with name = $1; if "I have no name" ret true with name = null; false; } run { if (nempty(name) && eqic(AI_WhatDidYouDoTodayBot.this.name, name)) ret with say("I know, " + name); AI_WhatDidYouDoTodayBot.this.name = name; say("Hello " + or2(name, "stranger")); } } class Attractor1 > Attractor { public bool matches(S s) { new Matches m; if "I ..." true; false; } run { say(nempty(name) ? switcheroo_youToI(switcheroo_iToName(name, input)) : switcheroo(input)); } } *() { standardAttractors(new SetNameAttractor, new Attractor1); } }