tspooner/rsrl

Examples don't seem to build

Closed this issue · 3 comments

I'm trying out the library for the first time and I'm having trouble getting it to build. rust 1.33:
I pulled the code from here: https://github.com/tspooner/rsrl/blob/master/examples/greedy_gq.rs

error[E0599]: no function or associated item named `scalar_output` found for type `lfa::lfa::LFA<_, _, _>` in the current scope
  --> src/main.rs:20:39
   |
20 |         let v_func = make_shared(LFA::scalar_output(bases.clone()));
   |                                  -----^^^^^^^^^^^^^
   |                                  |
   |                                  function or associated item not found in `lfa::lfa::LFA<_, _, _>`

error[E0599]: no function or associated item named `vector_output` found for type `lfa::lfa::LFA<_, _, _>` in the current scope
  --> src/main.rs:21:39
   |
21 |         let q_func = make_shared(LFA::vector_output(bases, n_actions));
   |                                  -----^^^^^^^^^^^^^
   |                                  |
   |                                  function or associated item not found in `lfa::lfa::LFA<_, _, _>`

error[E0061]: this function takes 2 parameters but 3 parameters were supplied
  --> src/main.rs:24:34
   |
24 |           let policy = make_shared(EpsilonGreedy::new(
   |  __________________________________^
25 | |             Greedy::new(q_func.clone()),
26 | |             Random::new(n_actions),
27 | |             Parameter::exponential(0.3, 0.001, 0.99),
28 | |         ));
   | |_________^ expected 2 parameters

error: aborting due to 3 previous errors

Looks like more specifically the examples don't build with the release of this library on crates.io. Switching over to the git master works.

Hey, sorry I didn't see this in time to help. This module is still in alpha so there may be cases where the examples aren't up-to-date with the code. I do my best to keep them in sync but it's more time.

Once I reach release version 1.0 and stabilise the interfaces I will be sure to expand on these examples and make sure they all work.

Please feel free to ask me if anything fails to build or if you have any other questions though and I'll do my best to get back to you.

Cheers,
Tom

Awesome! Thanks