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

Idea: Named variable declaration #40

Open
zsunberg opened this issue Dec 16, 2023 · 0 comments
Open

Idea: Named variable declaration #40

zsunberg opened this issue Dec 16, 2023 · 0 comments

Comments

@zsunberg
Copy link
Member

This is an idea transferred from the previous IDEAS.md (#39 ):

Named Variables

It might also be more clear what is going on if we declared variables with names as shown in the example below.

This would be tougher to compile though, and it's not clear what the easiest way to express distributions or reward would be.

Ideas welcome!

mdp = @MDP begin
    xmax = 10
    ymax = 10

    @states begin
        x in 1:10
        y in 1:10
    end

    @actions begin
        dir in [:up, :down, :left, :right]
    end

    @reward rdict = Dict(
                    #XXX no idea how to define this in terms of x and y
                 )
    default_reward = 0.0

    @transition #XXX what is the most concise way to define the transition distribution??

    terminal = vals(reward)
    discount = 0.95

    initial
end
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

No branches or pull requests

1 participant