使用Weka玩游戏
我正在做一个项目,让神经网络(或其他算法)在扑克中互相玩。每次获胜或失败后,我希望神经网络(或其他算法)根据损失的错误进行更新(如何计算在这里并不重要)。
Weka 非常好,我不想重新发明轮子。然而,Weka 的 API 似乎主要是为了从数据集进行训练而设计的。玩游戏不使用数据集。相反,网络开始播放,然后我希望它根据丢失情况进行自我更新。
是否可以使用 Weka API 来更新网络而不是数据集,但在一个实例上并一遍又一遍地执行此操作?我正在思考这个问题吗?
我还想实现的另一个想法是使用遗传算法来更新神经网络中的权重,而不是反向传播算法。据我所知,Weka 中没有办法手动指定神经网络的权重。当然,如果为此目的使用遗传算法,这一点至关重要。
请帮忙:)谢谢。
I am doing a project where I have neural networks (or other algorithms) play each other in poker. After each win or loss, I want the neural network (or other algorithm) to update in response to the error of the loss (how this is calculated is unimportant here).
Weka is very nice and I don't want to reinvent the wheel. However, Weka's API seems primarily designed to train from a dataset. Game playing doesn't use a dataset. Rather, the network plays, and then I want it to update itself based on its loss.
Is it possible to use the Weka API to update a network instead of a dataset but on one instance and do this over and over again? I'm I thinking about this right?
The other idea I also want to implement is use a genetic algorithm to update the weights in a neural network, instead of the backpropogation algorithm. As far as I can tell, there is no way to manually specify the weights of a neural network in Weka. This, of course, is vital if using a genetic algorithm for this purpose.
Please help :) Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
通常weka学习算法是批量学习算法。您需要的是增量分类器。
来自 weka 文档
请参阅分类器实现它的 UpdateableClassifier 接口。
您还可以查看MOA Massive Online Analysis工具,该工具与weka及其所有分类器密切相关由于在线学习的限制,这些都是渐进的。
Normally weka learning algorithms are batch learning algoritms. What you need are incremental classifier.
From weka docs
See UpdateableClassifier interface to which classifiers implement it.
Also you may look MOA Massive Online Analysis tool which is closely related with weka and all of its classifiers are incremental due to constraints of online learning.
据我所知,Weka 不提供在线学习(这就是你所问的)。
最好对您的游戏使用竞争分析进行调查。
Weka, as far as I can tell, does not do online learning (which is what you're asking about).
It might be better to investigate using competitive analysis for your game.
您可能必须在这里重新发明轮子。我不认为这是对时间的错误利用。
我目前正在实现一个学习分类器系统,这非常简单。我还建议研究这些类型的算法。互联网上有一个实现,但我仍然更喜欢自己编写代码。
You may have to reinvent the wheel here. I don't think it's a bad use of time.
I'm currently implementing a learning classifier system, which is pretty simple. I'd also advise looking into these kinds of algorithms. There is an implementation on the internet, but I still prefer to code my own.