from time import sleep
import school_env_builder
from random import randint
class FoolishStudent:
def __init__(self, agent_name):
self.agent_name = agent_name
self.env = school_env_builder.build()
def study(self, epochs):
for _ in range(epochs):
state = self.env.reset()
while True:
action = randint(0, self.env.action_space.size()-1)
next_state, reward, done, _ = self.env.step(action)
if reward < 0:
print('You are so stupid')
if done:
break
state = next_state
def take_a_break(self, epochs):
for _ in range(epochs):
sleep(1)
if __name__ == '__main__':
sl = FoolishStudent('songlei')
for day in range(365):
sl.study(0)
sl.take_a_break(10000000000)
permutationopt's Introduction
permutationopt's People
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.