Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI思考过慢导致未及时出牌数据不对 #36

Open
jhdonghj opened this issue Sep 18, 2021 · 1 comment
Open

AI思考过慢导致未及时出牌数据不对 #36

jhdonghj opened this issue Sep 18, 2021 · 1 comment

Comments

@jhdonghj
Copy link

有些时候AI思考太长时间,超出了雀魂的时间,导致实际上出出去的牌和AI想出出去的牌不同,然后下一巡再出牌的时候AI里的牌和实际的牌就会不一样,程序报错

Traceback (most recent call last):
  File "main.py", line 744, in <module>
    MainLoop(level=level)
  File "main.py", line 715, in MainLoop
    aiWrapper.recv(data)
  File "main.py", line 134, in recv
    self._eventHandler(msg.decode('utf-8'))
  File "main.py", line 159, in _eventHandler
    self.on_DiscardTile(d)
  File "main.py", line 593, in on_DiscardTile
    self.actionDiscardTile(tile)
  File "D:\MajsoulAI-master\majsoul_wrapper\action\action.py", line 187, in actionDiscardTile
    raise Exception(
Exception: ('GUIInterface.discardTile tile not found. L:', [('9m', (1095, 828)), ('3p', (1143, 828)), ('4p', (1190, 828)), ('4p', (1238, 828)), ('7p', (1285, 828)), ('8p', (1332, 828)), ('9p', (1380, 828)), ('4s', (1427, 828)), ('0s', (1474, 828)), ('6s', (1522, 828)), ('7s', (1569, 828)), ('7s', (1616, 828)), ('8s', (1664, 828)), ('4s', (1726, 828))], 'tile:', '3m')
@bailuWX
Copy link

bailuWX commented Dec 12, 2021

在main.py把这个函数的引用全部删了(这个函数是防止ai思考过于迅速的)
def wait_for_a_while(self, delay=2.0):
或者把delay设置的小一点,比如设置成1
由于每个人网络性能不一样,这个delay有时候反而会造成bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants