GithubHelp home page GithubHelp logo

felixlinker / ib_fpsrl Goto Github PK

View Code? Open in Web Editor NEW
6.0 6.0 1.0 4.55 MB

Prototype to benchmark the fuzzy particle swarm reinforcement learning (Hein, Hentschel, Runkler, Udluft 2017) algorithm on the industrial benchmark

Python 42.68% TeX 57.32%
machine-learning particle-swarm-optimization

ib_fpsrl's People

Contributors

felixlinker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

spokv

ib_fpsrl's Issues

Division by zero error

When applying a partial policy, sometimes one element of the activation vector becomes zero which leads to a division by zero error. The paper mentions that this is not possible so I guess the issue comes down to badly selected bounds for the policy vector.

  output = np.sum(actions) / np.sum(activations)  # shape ()
Traceback (most recent call last):
  File "ib_policy.py", line 229, in <module>
    generate_policy(*parse_cfg_args(load_policy_cfg))
  File "ib_policy.py", line 217, in generate_policy
    evaluation.evaluate_policy(cfg, policy_weights)
  File "/home/fl34gufe/Documents/IB_FPSRL/eval_policy.py", line 75, in evaluate_policy
    random_cost = np.mean(evaluater(random_policies))
  File "/home/fl34gufe/Documents/IB_FPSRL/ib_policy.py", line 124, in __call__
    costs = self.cost_function(batch)
  File "/home/fl34gufe/Documents/IB_FPSRL/eval_policy.py", line 32, in __call__
    dtype=float
  File "/home/fl34gufe/Documents/IB_FPSRL/eval_policy.py", line 31, in <lambda>
    map(lambda t: self.batch_applier(*t), zip(setpoints, action_batch)),
  File "/home/fl34gufe/Documents/IB_FPSRL/eval_policy.py", line 18, in __call__
    _, (fuel, consumption) = list(map(env.__call__, trajectory))[-1]
  File "/home/fl34gufe/Documents/IB_FPSRL/gen_dataset.py", line 78, in __call__
    self.benchmark.step(action_vector)
  File "/home/fl34gufe/Documents/IB_FPSRL/industrialbenchmark/industrial_benchmark_python/IDS.py", line 112, in step
    self.updateGS()
  File "/home/fl34gufe/Documents/IB_FPSRL/industrialbenchmark/industrial_benchmark_python/IDS.py", line 237, in updateGS
    reward, domain, phi_idx, system_response = self.gsEnvironment.state_transition(self.gsEnvironment._dynamics.Domain(domain), phi_idx, self.gsEnvironment._dynamics.System_Response(system_response), effective_shift)
  File "/home/fl34gufe/Documents/IB_FPSRL/industrialbenchmark/industrial_benchmark_python/goldstone/environment.py", line 39, in state_transition
    domain, phi_idx, system_response = self._dynamics.state_transition(domain, phi_idx, system_response, position)
  File "/home/fl34gufe/Documents/IB_FPSRL/industrialbenchmark/industrial_benchmark_python/goldstone/dynamics.py", line 62, in state_transition
    domain = self._compute_domain(old_domain, position)
  File "/home/fl34gufe/Documents/IB_FPSRL/industrialbenchmark/industrial_benchmark_python/goldstone/dynamics.py", line 88, in _compute_domain
    return self.Domain(sign(position))
  File "/u/fl34gufe/.local/share/virtualenvs/IB_FPSRL-bu2U3Xcm/lib64/python3.6/enum.py", line 291, in __call__
    return cls.__new__(cls, value)
  File "/u/fl34gufe/.local/share/virtualenvs/IB_FPSRL-bu2U3Xcm/lib64/python3.6/enum.py", line 533, in __new__
    return cls._missing_(value)
  File "/u/fl34gufe/.local/share/virtualenvs/IB_FPSRL-bu2U3Xcm/lib64/python3.6/enum.py", line 546, in _missing_
    raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: nan is not a valid Domain```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.