使用Weka玩游戏

发布于 2024-10-21 13:14:51 字数 371 浏览 3 评论 0原文

我正在做一个项目,让神经网络(或其他算法)在扑克中互相玩。每次获胜或失败后,我希望神经网络(或其他算法)根据损失的错误进行更新(如何计算在这里并不重要)。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

西瓜 2024-10-28 13:14:51

通常weka学习算法是批量学习算法。您需要的是增量分类器。

来自 weka 文档

大多数分类器在训练之前都需要查看所有数据,例如 J48 或 SMO。但也有一些方案可以以增量方式进行训练,而不仅仅是批处理模式。所有实现weka.classifiers.UpdateableClassifier接口的分类器都能够以这种方式处理数据。

请参阅分类器实现它的 UpdateableClassifier 接口。

您还可以查看MOA Massive Online Analysis工具,该工具与weka及其所有分类器密切相关由于在线学习的限制,这些都是渐进的。

Normally weka learning algorithms are batch learning algoritms. What you need are incremental classifier.

From weka docs

Most classifiers need to see all the data before they can be trained, e.g., J48 or SMO. But there are also schemes that can be trained in an incremental fashion, not just in batch mode. All classifiers implementing the weka.classifiers.UpdateableClassifier interface are able to process data in such a way.

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.

谢绝鈎搭 2024-10-28 13:14:51

据我所知,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.

就此别过 2024-10-28 13:14:51

您可能必须在这里重新发明轮子。我不认为这是对时间的错误利用。

我目前正在实现一个学习分类器系统,这非常简单。我还建议研究这些类型的算法。互联网上有一个实现,但我仍然更喜欢自己编写代码。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文