alphazerofromscratch's Introduction
alphazerofromscratch's People
Forkers
pterameta ambriel2016 ternarym01 filda1 newcooldiscoveries-ai-labs amphilip hdocmsu kshah-5683 lvhuantian thor10 tengso nullzero-live sabrikhalil igorleshchuk saehan-choi codeplexer logiachess nite4inspired pendu lucetre stanai7060 gauthamastro artinmfar pq-007 babyaries mariusconstantin3011 yidong72 chong5u zlatkojoncev darrengao628 hbcbh1999 ngueukam whalawa ertkonuk leoni-q xiaohanyu1 xebitstudios zlnvrb tianyu-z asystentroberta deekshitld rexne felipe-fernandes zebrowskitomasz zsoltbihary zedyz projectgleb mobil787 finconmas wesleykooalphazerofromscratch'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
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.