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

bot #68

Open
Veiasai opened this issue Nov 25, 2019 · 6 comments
Open

bot #68

Veiasai opened this issue Nov 25, 2019 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@Veiasai
Copy link
Collaborator

Veiasai commented Nov 25, 2019

游戏内所有操作没有通知bot。

设想:

  1. 设计一个api,通知bot游戏内其他玩家的操作。
  2. 轮到bot执行时,调起bot。
  3. 开发强力bot。
@Veiasai Veiasai added the enhancement New feature or request label Nov 25, 2019
@Veiasai Veiasai added this to the Poker v2.1 milestone Nov 25, 2019
@yfzm
Copy link
Owner

yfzm commented Nov 25, 2019

当前设计bot可以根据game参数直接获取场上所有数据。
当前bot阻塞了倒计时线程,如果bot的计算时间超过1s,会卡秒影响游戏体验

还是说你的意思是bot自己维护自己视角下的游戏进程?

@Veiasai
Copy link
Collaborator Author

Veiasai commented Nov 25, 2019

bot直接从game拿数据来判断游戏进程,过于麻烦,而且每个bot自己都得实现一遍,这完全可以标准化。
主要是想知道,哪一个玩家raise了,其他玩家的操作又是什么。
自己看game,就需要记住上一轮的数据,然后再计算了。

bot拆成单独的线程吧,从读秒拆出去?

@Veiasai
Copy link
Collaborator Author

Veiasai commented Nov 25, 2019

还有一个思路,游戏记一个主线log,然后仅当bot处于执行位置的时候,才调用react。
此时卡顿是合理的,反正就是在等待这个bot进行,设计一个内部超时时间。

@yfzm
Copy link
Owner

yfzm commented Nov 25, 2019

当前本轮的操作已经被存在game.actions里面了

@yfzm
Copy link
Owner

yfzm commented Nov 25, 2019

@laazy 的思路是将bot看作和slack用户一样地位的存在

卡顿的问题在于slack客户端需要每隔1s倒计时减一,如果卡住这个倒计时,游戏体验会下降

@yfzm
Copy link
Owner

yfzm commented Nov 25, 2019

目前看来把bot拆成单独的线程还挺好

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

No branches or pull requests

2 participants