Comments (6)
Unfortunately I didn't really add in support for pickles yet (since I never actually used them). I could look into it though - it seems to be a little time consuming though so I'm not sure how much time it'll take.
In the meantime, you can probably just somehow convert your QFunction to some format you can save. It has a shape
function so you can just loop over it and save all the values it has.
Afterwards, you can create an MDP.Matrix2D
instance of the same size, and copy the saved contents into it. This you can pass into a new instance of MDP.QGreedyPolicy
and it should work the same as before.
from ai-toolbox.
Actually, I've just added a new commit, which seems to work on my end. I've added the ability to pickle the MDP.Policy
class. So you just have to create a new MDP.Policy
and use it to copy your MDP.QGreedyPolicy
(since that cannot be pickled directly).
Then it should just work. Let me know if you have trouble!
from ai-toolbox.
Do I need to rebuild? Currently I do not have g++-7 version. When I tried to install it from ppa: ubuntu-toolchain-r/test, the package could not be found.
from ai-toolbox.
In theory g++-6
would work but it seems it has a bug. However, clang++
seems to work fine. g++-7
at the moment is only available on Ubuntu 17.04, but as soon as a proper release is done it should definitely be backported to previous versions.
If neither upgrading OS nor using clang++
is an option for you, you can temporarily use the workaround I specified (storing your QFunction
by hand and reloading it) until the g++-7
package is backported.
from ai-toolbox.
About the workaround, the shape of the QFunction is (6084, 4), but when I enter QFunction[6100, 20], I could still get results back. Why?
from ai-toolbox.
Well if you create a table bigger than what it is it's still going to be able to store the previous one. As long as you don't ask for states/actions which you have not initialized everything should be good =)
from ai-toolbox.
Related Issues (20)
- Python module problem HOT 26
- Using the Toolbox to solve the Tag problem HOT 4
- Save POMDP policy HOT 6
- Sparse Matrix's on POMDP model HOT 22
- Improve serialization for MDP and POMDP Sparse Models HOT 1
- Problem with make HOT 5
- Make cannot find .hpp file in Boost HOT 2
- Errors when compiling tutorials HOT 5
- Can't find Lpsolve when run cmake HOT 9
- Using AI-Toolbox with OMNeT++ HOT 2
- Make issue HOT 9
- Not able to find "compare" file HOT 3
- Trouble installing and running AIToolbox HOT 9
- about LP_Solve HOT 13
- error C3779: 'AIToolbox::IndexMapIterator<IdsIterator,Container>::operator *': a function that returns 'auto' cannot be used before it is defined HOT 11
- Better Project Setup Tutorial HOT 6
- C++: error: expected โ)โ before โelementsNโ HOT 10
- Problems when building the library HOT 4
- Sparse Matrix: Space Time Complexity while assigning and accessing an element. HOT 1
- Can't build because of lpslove HOT 16
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 ai-toolbox.