user_said(_Concept, __, __):-		% dont care about the concept value
	user_said(_Concept).		%   so strip it off
user_said(_Concept, __):-
	user_said(_Concept).
user_said(_Concept):-			% handle new user input
	time(_Now),			% get current time
	retract(lasttime(_Lasttime)),	% get time of last user input
	_Delay is _Now - _Lasttime,
				% collect info on how long user took to
				% assimilate the new meta_concept
				% (ie to read & understand the form)
				% by looking at the delay until he/she
				% inputs the 1st piece of data
	( focussed(_Meta_concept) ->	% we have 1st input for this mc
		assert(mc_assim(_Meta_concept, _Delay)), % record delay
		( _Delay < 120, _Delay > 20,
			feedback_user(assim)	% having difficulties?
		;
			true	% delay > 2 mins => gone to coffee
		),
		retract(focussed(_Meta_concept))
	;
		true		% wasn't new mc
	),
				% collect info on how often the user
				% vacillates about this concepts value
				% (ie cycles through menu values)
				% as this indicates uncertainty
	(retract(previous_concept(_P_c)) ; true),	% get last inpust
	(retract(penultimate_concept(_Pp_c)) ; true),
	( ( _Concept = _P_c ; _Concept = _Pp_c ) ->
		( retract(vacillate(_Concept, _No)) ; _No is 0),
		_New_no is _No + 1,
		assert(vacillate(_Concept, _New_no)),	% record
		( _New_no > 5 ->	% >5 changes => confusion?
			feedback(vacil),
			assert(vacillate(_Concept, 0))	% reset
		;
			assert(vacillate(_Concept, _New_no))	%record
		)
	;
		true		% wasn't same cpt
	),
	assert(previous_concept(_Concept)),		% update
	assert(penultimate_concept(_P_c)),
				% check if the user is having to override
				% the Knowledge Handler often
	( retract(no_inputs(_No_i)) ; _No_i is 0 ),
	( knownw(_Concept, __, __, kb_set) ->	 % is overriding kb?
		( retract(kb_override(_Num)) ; _Num is 0),	% yes
		_New_num is _Num + 1,
		( _New_num > _no_i / 5 ->	%limit of 20% overrides
			feedback(override),
			assert(kb_override(0))	% reset counter
		;
			assert(kb_override(_New_num))	% record
		)
	;
		true			% not set by kb
	).
user_said(_Concept).		% user_said predicates should never fail


focus_user(_Meta_concept):-	% record kb focusing user on new mc
	( retract(focussed(__)) ; true ), %remove old predicate, if any
	assert(focussed(_Meta_concept)).



feedback(assim, _):-		% trouble assimulating meta_concepts
	chat_usr([
		['If you feel that I am not addressing this topic in'],
		['the right way, you could try selecting a different'],
		['user type (on the top level form).']
		 ]).

feedback(vacil,expert):-	% can't cope with expert level?
	chat_usr([
		['If you feel that I am not addressing this topic at'],
		['the right level, you could try selecting a different'],
		['user level (on the top level form).']
		 ]).
	% Note, if already novice, can't do anything more than I doing

feedback(override, novice):-	% seems to know what he is doing
	chat_usr([
		['If you feel that the suggestions I am making are not'],
		['quite appropriate, you could try changing to a higher'],
		['user level or a more "performance modeller" type,'],
		['(on the top level form).']
		 ]).

