Comments (4)
Hello @zsunberg ,
But I am wondering what the purpose of the Space wrapper is.
It is to support some complicated state/action spaces.
Let's say we have an environment of action space of ((:left, :top), (false, true))
. Now we want to sample one random action from it. But what's the result? Is it one of (:left, :top)
and (false, true)
, or is it one of (:left, false)
, (:left, true)
, (:top, false)
, (:top, true)
?
To avoid such confusion, the Space
wrapper is added to explicitly distinguish between such two cases.
For the former, we use Space(((:left, :top), (false, true)))
, for the later we use (Space((:left, :top)), Space((false, true)))
.
Another way to address such confusion is to define dedicated space types, like TupleSpace
, VectorSpace
or DictSpace
. Personally I feel this approach is a bit redundant. However, that's just based on my limited programming experience.
Why don't we just allow people to use normal Vectors or Tuples and then define the traits for those objects directly?
I think we can add the support for some common element types (Number, String, Symbol, etc) like you proposed above. So that for some common spcaes, users don't need create the Space
wrapper at all. What do you think?
from commonrlspaces.jl.
What if we get rid of Space
and define the elements of a space to be all objects x
for which x in space
returns true
. This eliminates the ambiguity. union
and rand
would also work nicely with this.
We could also introduce product
(or setproduct
or cartesian_product
) to accomplish what you were thinking with (Space((:left, :top)), Space((false, true)))
.
What do you think? I am going to start a PR with this so we can discuss.
from commonrlspaces.jl.
What if we get rid of
Space
and define the elements of a space to be all objectsx
for whichx in space
returnstrue
. This eliminates the ambiguity.union
andrand
would also work nicely with this.
Yes, But then we may need to figure out how to handle continuous spaces.
What do you think? I am going to start a PR with this so we can discuss.
That'd be great!
from commonrlspaces.jl.
closed with #9
from commonrlspaces.jl.
Related Issues (9)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commonrlspaces.jl.