Giter VIP home page Giter VIP logo

alphazerofromscratch's People

Contributors

foersterrobert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

alphazerofromscratch's Issues

ValueError when using temperature_action_probs as p argument in np.random.choice

When using temperature_action_probs as the p argument in np.random.choice, a ValueError is raised with the message "probabilities do not sum to 1". This occurs because temperature_action_probs is being raised to the power of 1 / self.args["temperature"], which can cause the values to no longer sum to 1.

To fix this issue, you can normalize temperature_action_probs so that its values sum to 1. You can do this by dividing temperature_action_probs by its sum:

temperature_action_probs /= np.sum(temperature_action_probs)

This will ensure that the values in temperature_action_probs sum to 1, which will allow you to use it as the p argument for np.random.choice.

Steps to Reproduce:

Run the code with temperature_action_probs as the p argument in np.random.choice.
Observe the ValueError with the message "probabilities do not sum to 1".
Expected Behavior:

The np.random.choice function should be able to accept temperature_action_probs as the p argument without raising a ValueError.

Actual Behavior:

A ValueError is raised with the message "probabilities do not sum to 1".

Fix:

Normalize temperature_action_probs so that its values sum to 1 by dividing it by its sum:

temperature_action_probs /= np.sum(temperature_action_probs)

Circular Import Error

/Users/atatekeli/PycharmProjects/AlphaZero/venv/bin/python /Users/atatekeli/PycharmProjects/AlphaZero/tic_tac_toe.py
Traceback (most recent call last):
File "/Users/atatekeli/PycharmProjects/AlphaZero/tic_tac_toe.py", line 3, in
from model import ResNet
File "/Users/atatekeli/PycharmProjects/AlphaZero/model.py", line 5, in
from tic_tac_toe import TicTacToe
File "/Users/atatekeli/PycharmProjects/AlphaZero/tic_tac_toe.py", line 3, in
from model import ResNet
ImportError: cannot import name 'ResNet' from partially initialized module 'model' (most likely due to a circular import) (/Users/atatekeli/PycharmProjects/AlphaZero/model.py)

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.