Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable step up and implement ranking #66

Merged
merged 5 commits into from
Oct 5, 2020
Merged

Conversation

nikvoloshin
Copy link
Contributor

  • Now only the following transitions are available:

    • transitions from the current state to its children
    • transitions to the current state itself
    • transitions from the root, if the current state is not modal
  • Implemented activation selection with two default implementations:

    • by the context and then by the confidence
    • by confidence weighted with the context

Closes #38

Now activators will only look on transitions either from the current
context or from the root
@nikvoloshin nikvoloshin self-assigned this Oct 5, 2020
): Float {
val current = botContext.dialogContext.currentContext

val factor = when {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these magic numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just by trial-and-error. We have only three sets of states, so we can define constants for them instead of calculating some penalty at runtime

@@ -0,0 +1,38 @@
package com.justai.jaicf.model.activation.selection
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure this interface and its implementations should be placed to model?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can move it to com.justai.jaicf.activator.selection, is it okay?

* 2. The current state itself;
* 3. States available from the root of scenario.
*/
open class ContextRankingActivationSelector : ActivationSelector {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to use this implementation as default selector instead of ContextFirstActivationSelector? Looks like it covers the context-first selector cases.

@nikvoloshin nikvoloshin merged commit b6dca49 into master Oct 5, 2020
@nikvoloshin nikvoloshin deleted the activators-enhancements branch October 5, 2020 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ranking function to state selection
2 participants