Giter VIP home page Giter VIP logo

x-armed-bandits's People

Contributors

ardaegeunlu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

tuantx7110

x-armed-bandits's Issues

Error when taking midpoint

Hi, thanks for the update. I tried running the code after just replacing the file, and now I get the following problem.


KeyError Traceback (most recent call last)
in ()
22 x_armed_bandit.set_time_horizon(max_plays=1000)
23 x_armed_bandit.set_environment(environment_function=testFunction.draw_value)
---> 24 x_armed_bandit.run_hoo()
25
26 # this is the most rewarding point explored so far after "max_plays" rounds.

~\Documents\X-armed-Bandits-master\HOO.py in run_hoo(self)
149 # now we have selected the most promising child from the tree we had,
150 # we can draw an arm in X from the coverings
--> 151 reward = self.selection_of_arm_from_covering(current_node_depth, current_node_in_level)
152 self.create_children_of_node(current_node)
153

~\Documents\X-armed-Bandits-master\HOO.py in selection_of_arm_from_covering(self, h, i)
71 :return: received reward.
72 """
---> 73 subset_space = self.tree_coverings(h, i)
74 # now we need to arbitrarily select one arm from this subset of the space.
75 # the chosen strategy is selecting the midpoint of the subset but this can

~\Documents\X-armed-Bandits-master\Partitioner.py in halve_one_by_one(self, height, place_in_level)
65 parent_h = height - 1
66 parent_i = (place_in_level + 1) / 2
---> 67 parent_space = self.covering_sequence[parent_h, parent_i]
68 #print("index = {0},{1} and parent = {2},{3}".format(height,place_in_level,parent_h,parent_i))
69 # partition the dimension_to_be_partitioned into half.

KeyError: (0, 1.5)

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.