This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/suragnair/alpha-zero-general/blob/5156c7fd1d2f3e5fefe732a4b2e0ffc5b272f819/MCTS.py#L105-L121 | |
cur_best = -float('inf') | |
best_act = -1 | |
# pick the action with the highest upper confidence bound | |
for a in range(self.game.getActionSize()): | |
if valids[a]: | |
if (s, a) in self.Qsa: | |
u = self.Qsa[(s, a)] + self.args.cpuct * self.Ps[s][a] * math.sqrt(self.Ns[s]) / ( | |
1 + self.Nsa[(s, a)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/suragnair/alpha-zero-general/blob/5156c7fd1d2f3e5fefe732a4b2e0ffc5b272f819/MCTS.py#L37-L48 | |
for i in range(self.args.numMCTSSims): # self.args.numMCTSSims, the number of MCTS simulations to compute | |
self.search(canonicalBoard) # "search" is a MCTS simulations | |
s = self.game.stringRepresentation(canonicalBoard) | |
# Count how many times we have visited each node | |
counts = [self.Nsa[(s, a)] if (s, a) in self.Nsa else 0 for a in range(self.game.getActionSize())] | |
if temp == 0: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Project Gutenberg EBook of The Republic, by Plato | |
This eBook is for the use of anyone anywhere at no cost and with | |
almost no restrictions whatsoever. You may copy it, give it away or | |
re-use it under the terms of the Project Gutenberg License included | |
with this eBook or online at www.gutenberg.org | |
Title: The Republic |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__________________________________________________________________________________________________ | |
Layer (type) Output Shape Param # Connected to | |
================================================================================================== | |
input_1 (InputLayer) (None, None, None, 3 0 | |
__________________________________________________________________________________________________ | |
conv2d_1 (Conv2D) (None, None, None, 3 864 input_1[0][0] | |
__________________________________________________________________________________________________ | |
batch_normalization_1 (BatchNor (None, None, None, 3 96 conv2d_1[0][0] | |
__________________________________________________________________________________________________ | |
activation_1 (Activation) (None, None, None, 3 0 batch_normalization_1[0][0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from selenium import webdriver | |
from BeautifulSoup import BeautifulSoup | |
import requests | |
options = webdriver.ChromeOptions() | |
options.add_argument('headless') | |
driver = webdriver.Chrome(chrome_options=options) | |
driver.set_window_size(1280, 1600) | |
filename = 'NOTICE.html' |
NewerOlder