kach / kach/memo

Aliases for `knows`

Open
#122 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
157
Forks
16
PR merge metrics
No merged PRs in 30d

Description

Sometimes, we need to use `knows` to force an agent to be aware of an axis, but we don't really mean they know the _value_ of that axis in the everyday use of the term. Would it be possible to consider adding aliases for `knows` that fit this case more cleanly, for better code readability and programmer reasoning?

For example, we might say:

```
@memo
def model[s: State, a: Action]():
alice: knows(s) # here, she doesn't really "know" the state in a true sense, instead she is considering / reflecting on it, holding the value in her mind

alice: thinks[
bob: given(s in State, wpp=exp(s)),
bob: chooses(a in Action, wpp=exp(s*a))
]

alice: observes [bob.a] is a

return alice[
Pr[bob.s == s]
]
```

I think the aliases for `chooses` (e.g., given, draws) are great examples that have made the language much clearer to me, even though they are just sugar (and being just straight aliases, are maybe even better understood as calorie-free stevia?).

I don't know what the safest choices would be, but what about something like:

```
alice: aware_exists(s)
alice: knows_about(s)
alice: knows_axis(s)
alice: actively_considers(s)
```

Like observes, you could also do it with a mnemonic:

```
alice: knows [s] # which could syntactically distinguish the two different uses of knows
alice: considers_case_of [s] is s
```

Again, I'm not attached to any particular alias, but I think the fact that `knows` has uses that are distinct from it's everyday meaning suggests it could be fertile ground for the same kind of successful aliases we now have for `chooses`.

- Ian

PS - I've had a full day of memo thoughts, so I promise this is the last one. Thanks again for everything you do on this language, it is a real pleasure to use.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing how the existing `knows`, `chooses`, and `observes` constructs are represented and how `chooses` aliases are handled. The issue names no files or tests; the work is complete only after a specific alias design is agreed on and its syntax and semantics are implemented consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.