You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i run my code and every time i get a different out put so just i want an explanation why i have different out put
#########################################################################################
this is my code :
import numpy as np
import gym
import random
import matplotlib.pyplot as plt
from random import choice
from tqdm.notebook import tqdm
from kaggle_environments import evaluate, make
state = env.reset()
print(state.board) #this is the tricky
###########################################################################################
this is the different output:
/bin/python /home/gadour/Music/beginig.py
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
Traceback (most recent call last):
File "/home/gadour/Music/beginig.py", line 78, in
print(state.board)
^^^^^^^^^^^
AttributeError: 'Struct' object has no attribute 'board'
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
Traceback (most recent call last):
File "/home/gadour/Music/beginig.py", line 78, in
print(state.board)
^^^^^^^^^^^
AttributeError: 'Struct' object has no attribute 'board'
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
Traceback (most recent call last):
File "/home/gadour/Music/beginig.py", line 78, in
print(state.board)
^^^^^^^^^^^
AttributeError: 'Struct' object has no attribute 'board'
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
Traceback (most recent call last):
File "/home/gadour/Music/beginig.py", line 78, in
print(state.board)
^^^^^^^^^^^
###########################################################################################
So guys why the hell some times return to me the list and some times just give me an error saying 'Struct' object has no attribute 'board' why that happen please i want logical explanation and thnx
Note: I know if i use state['board'] it work better, but i want to know why the unstable output it's 04:48pm now i can't sleep thinking, so please i'm so excited to know why it goes like that.
The text was updated successfully, but these errors were encountered:
i run my code and every time i get a different out put so just i want an explanation why i have different out put
#########################################################################################
this is my code :
import numpy as np
import gym
import random
import matplotlib.pyplot as plt
from random import choice
from tqdm.notebook import tqdm
from kaggle_environments import evaluate, make
class ConnectX(gym.Env):
def init(self, switch_prob=0.5):
self.env = make('connectx', debug=True)
self.pair = [None, 'negamax']
self.trainer = self.env.train(self.pair)
self.switch_prob = switch_prob
class QTable:
def init(self, action_space):
self.table = dict()
self.action_space = action_space
env = ConnectX()
alpha = 0.1
gamma = 0.6
epsilon = 0.99
min_epsilon = 0.1
episodes = 10000
alpha_decay_step = 1000
alpha_decay_rate = 0.9
epsilon_decay_rate = 0.9999
q_table = QTable(env.action_space)
all_epochs = []
all_total_rewards = []
all_avg_rewards = [] # Last 100 steps
all_qtable_rows = []
all_epsilons = []
state = env.reset()
print(state.board) #this is the tricky
###########################################################################################
this is the different output:
/bin/python /home/gadour/Music/beginig.py
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
Traceback (most recent call last):
File "/home/gadour/Music/beginig.py", line 78, in
print(state.board)
^^^^^^^^^^^
AttributeError: 'Struct' object has no attribute 'board'
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
/bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
Traceback (most recent call last):
File "/home/gadour/Music/beginig.py", line 78, in
print(state.board)
^^^^^^^^^^^
AttributeError: 'Struct' object has no attribute 'board'
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
Traceback (most recent call last):
File "/home/gadour/Music/beginig.py", line 78, in
print(state.board)
^^^^^^^^^^^
AttributeError: 'Struct' object has no attribute 'board'
[gadour@fedora ns-3.37]$ /bin/python /home/gadour/Music/beginig.py
Loading environment lux_ai_s2 failed: No module named 'vec_noise'
Traceback (most recent call last):
File "/home/gadour/Music/beginig.py", line 78, in
print(state.board)
^^^^^^^^^^^
###########################################################################################
So guys why the hell some times return to me the list and some times just give me an error saying 'Struct' object has no attribute 'board' why that happen please i want logical explanation and thnx
Note: I know if i use state['board'] it work better, but i want to know why the unstable output it's 04:48pm now i can't sleep thinking, so please i'm so excited to know why it goes like that.
The text was updated successfully, but these errors were encountered: