示例#1
0
def ChangeToHuman(agentList, flowMgr):
    flowMgr.changePlayer('Human')
    flowMgr.reset()
    
if __name__ == "__main__":
    from Lono import FactoredQ
    from PongUI import PongUI
    from Grid import Grid
    from pgu import gui
    import sys,pygame


    app = gui.App()
    form = gui.Form()
    ui = PongUI()

    frame = gui.Container(align=-1,valign=-1)
    frame.add(ui,0,0)
    app.init(frame)

    gameScreenSize = 800, 800
    uiSize = 400, 800
    assert uiSize[1] == gameScreenSize[1]
    screenSize = (gameScreenSize[0] + uiSize[0], gameScreenSize[1])
    discrete_size = 8
    delay = 100
    interval = 50
    action = 0

    pygame.init()
示例#2
0
文件: RLManager.py 项目: lono175/Pong
def ChangeToHuman(agentList, flowMgr):
    flowMgr.changePlayer('Human')
    flowMgr.reset()
    
if __name__ == "__main__":
    from SARSA import SARSA
    from PongUI import PongUI
    from Environment import Environment
    from pgu import gui
    import sys,pygame


    app = gui.App()
    form = gui.Form()
    ui = PongUI()

    frame = gui.Container(align=-1,valign=-1)
    frame.add(ui,0,0)
    app.init(frame)

    gameScreenSize = 400, 400
    uiSize = 400, 400
    assert uiSize[1] == gameScreenSize[1]
    screenSize = (gameScreenSize[0] + uiSize[0], gameScreenSize[1])
    discrete_size = 20
    delay = 100
    interval = 50
    action = 0

    pygame.init()
示例#3
0
def ChangeToHuman(agentList, flowMgr):
    flowMgr.changePlayer('Human')
    flowMgr.reset()
    
if __name__ == "__main__":
    from SARSA import SARSA
    from PongUI import PongUI
    from Environment import Environment
    from pgu import gui
    import sys,pygame


    app = gui.App()
    form = gui.Form()
    ui = PongUI()

    frame = gui.Container(align=-1,valign=-1)
    frame.add(ui,0,0)
    app.init(frame)

    gameScreenSize = 400, 600
    uiSize = 400, 600
    assert uiSize[1] == gameScreenSize[1]
    screenSize = (gameScreenSize[0] + uiSize[0], gameScreenSize[1])
    gameScreenSize = 400, 400
    discrete_size = 20
    delay = 100
    interval = 50
    action = 0