-
Notifications
You must be signed in to change notification settings - Fork 6
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
WIP implement IBIS1 starter #1
Conversation
3203265
to
75a4eeb
Compare
The plan contains a single wh-question.
Also, remove sender -- it is not needed, provided to DME on invocation (parentRef).
src/rules.ts
Outdated
return "resolves" === x.type; | ||
} | ||
|
||
const plans = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better move it to the parent machine's context (isu.ts
or tests), which is provided to DME as input.
integrate_usr_request: ({ is }) => { | ||
if ( | ||
is.shared.lu!.speaker === "usr" && | ||
is.shared.lu!.move.type === "request" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be added to types.ts
(interface Move
definition). Perhaps, we should also make distinction between moves and actions.
src/nlug.ts
Outdated
[ | ||
{ | ||
"type": "ask", | ||
"content": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So far I express questions like functions:
const q = (x) => `meeting person ${x}`
This would make resolving QUDs pretty straightforward: q("Vlad")
evaluates to meeting_person Vlad
. But maybe there is a better way with js objects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, representing questions as functions is attractive. But representing propositions as strings ("meeting_person vlad") might become problematic, when such strings will need to be parsed, e.g. to identify the argument. How about something like:
const q = (x) => {"type": "proposition", "content": {"predicate": "meeting_person", "argument": x}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! (it should be either with parenthesis -- const q => ({ ... })
or return -- const q => {return { ... }}
, or some people recommend against this syntax -- function q(x) => {return { ... }}
).
42d5b51
to
10a6e38
Compare
Additionally, update @statelyai/inspect and make typescript checks for pull requests.
(result of rebase)
The error broke live mode, but not DME tests.
...instead of as list of pairs.
Also move plans to domain.
After the change, instead of returning an object containing preconditions (boolean) and potentially result of applying rule (information state), rules now return a function that returns the new information state (if preconditions hold), or undefined if preconditions do not hold. Also, logging of rule applications is now generalized.
...instead of as function. Representing at as a Javascript function was appealing in the sense that it generalized to any predicate arity, but created problems with equality checks.
Before this change, ASR_NOINPUT caused a user input to be simulated. This was used for testing.
This solves the test failure at the end of "system answer from database".
Also make is.database.consultDB implementation more specific.
Open questions: