private void _ability_askForHelp() { var question = _databaseQuestion(); _askedQuestion = question; _body.Print(_askedQuestion.ReadableRepresentation()); }
private double rankQuestion(SemanticItem question) { var q = question.Question; var score = 0.0; if (q == Question.IsItTrue) { score += 0.1; } else if (q == Question.Entity) { score += 0.0; } else if (q == Question.HowToEvaluate) { score += 0.2; } else if (q == Question.WhatShouldAgentDoNow) { score += 0.1; } else if (q == Question.HowToDo) { score += 0.1; } else { score += 1; } score += 1.0 / (1.0 + question.Constraints.VariableValues.Count()); var inputWords = new HashSet <string>(_body.InputHistory.Last().Split(' ')); var commonWordCount = question.ReadableRepresentation().Split(' ').Sum(qw => _body.InputHistory.Contains(qw) ? 1 : 0); score += commonWordCount; return(score); }