Comments (5)
Thanks for fixing this! It is now in the master branch with the reset()
function from GridWorldMDP passing tests.
from emdp.
from emdp.
I fixed the issue in a recent commit. Sorry for the trouble. If you want to suggest a better fix I am happy to consider and accept. I will leave this issue open.
from emdp.
Hey thanks for your prompt reply. I feel removing the GridWorldMDP class reset function doesn't set the self.human_state at the initialization. This may affect other functions that use this variable to render the env graphically.
I feel assigning the extra variables (like size) that are not required by the MDP init prior to calling super.__init__
is a better workaround. This is what it would look like:
if not convert_terminal_states_to_ints:
terminal_states = list(map(lambda tupl: int(size * tupl[0] + tupl[1]), terminal_states))
self.size = size
self.human_state = (None, None)
self.has_absorbing_state = len(terminal_states) > 0
super().__init__(P, R, gamma, p0, terminal_states, seed=seed, skip_check=skip_check)
# self.reset()
def reset(self):
super().reset()
self.human_state = self.unflatten_state(self.current_state)
from emdp.
Created a PR (#19) with this change.
from emdp.
Related Issues (8)
- Better support for `has_terminal_state`
- add analytic calculations and tests
- Version in __init__.py prevents installation when numpy is not installed in a machine.
- Add functions to build environments in a more object oriented fashion
- Add visualization tools
- Write tests for object oriented builder HOT 1
- New plotting updates
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 emdp.