• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

Open Tibia machine learning projects

Source

Intermediate OT User
Joined
May 31, 2020
Messages
141
Reaction score
131
Location
OpenTibia .dev
GitHub
source61
Hey everyone.

I have 3 ML ideas of mine I'd like to share with you that I'm either working on or would like to work on in the future:
  1. Multi-protocol system that can be implemented on any OTS without having to recompile the server to "switch" between versions.
  2. Sprite generation: replacing all the original proprietary sprites, making Open Tibia fully open source once and for all.
  3. Open Tibia AI client for research/educational/entertainment purposes.

I'm already about halfway done or so with the first one (multi-protocol system).
I've tried for a couple of hours to get sprite generation done using @nightwolf's old GAN2 code, but because of some dependency he's deleted from his google drive his code no longer works out of the box.
And the Open Tibia AI client is just an idea for now, I've tried to figure out how I can turn my current server engine code into an Open Tibia client and I have some idea how to do it, but haven't taken any actual steps yet towards actually implementing it (this project will likely be the hardest to make as well, the Client shouldn't be hard, but the training of the CNN to try to create general Open Tibia AI is probably going to be ridiculously hard).

Interested in contributing? Feel free to post your comments here or reach out to me on discord: Source#1987. Note that if you don't want OTLand to know of your participation/contributions to the project you could always contact me and ask for anonymity and I'll always respect that.
Got other ML ideas you'd like to share or positive/constructive feedback? Feel free to post it here.


No real screenshots to post yet except for a JS web tool I wrote in a couple of hours to analyze the results of the "Multi-protocol ML system":
image.png


For refr I'm using pytorch for the ML.
Actually, here's some bonus footage of some webcam filters I implemented using ML (NP then ML to optimize) to practice my ML skills and to potentially use in the future for livestreaming (the ascii art one was basically copy-pasted, but everything else including the random angling and fps stats was basically implemented from scratch except for the input/output devices which were all imported as modules).

TLDR: Me use ML, me make multi-protocol system for server, this system good, good system make more player and more fun, me like fun.
Me also have 2 more ML ideas me would like to work on. You like to work on too? Me happy, maybe you me work together make big ML boom boom? :eek:
 
Last edited:

Silba

is stephany, the josh wife
Joined
Aug 22, 2013
Messages
436
Solutions
9
Reaction score
348
me like ml me love your ideas me noob can't contribute probably me offer gratitude and hope instead, good luck !
 
OP
OP
Source

Source

Intermediate OT User
Joined
May 31, 2020
Messages
141
Reaction score
131
Location
OpenTibia .dev
GitHub
source61
Source is a scammer - watch out on him
Not sure how you can scam someone by offering them a free introduction to ML in exchange for nothing but a promise that they'll in return contribute to one of several listed projects in the future for free, but sure.

what about procedural world maps? that could be awesome
Interesting idea, but I believe it's already been done to some extent, but might not have been made public though.
This might become part of TSS/TSFTW in the future, but that remains one of my exclusively private projects for now beyond a discussion thread with general screenshots, general explanations and discussion back and forth on the topic TSS vs TFS.
 
Last edited:

nasu

Member
Joined
Jan 20, 2008
Messages
103
Reaction score
13
GitHub
KrwawyOrk
I wonder if it is possible to teach monsters on the server? to make them smarter and more challenging in fights....

off topic: supposedly in Forza Horizon 5 (..4 too?) the AI learns from the players and drives at a high level
 
OP
OP
Source

Source

Intermediate OT User
Joined
May 31, 2020
Messages
141
Reaction score
131
Location
OpenTibia .dev
GitHub
source61
I wonder if it is possible to teach monsters on the server? to make them smarter and more challenging in fights....

off topic: supposedly in Forza Horizon 5 (..4 too?) the AI learns from the players and drives at a high level
It's possible, but highly limited by performance, so I think it has to be niche to work.
But that's the fun part about the AI/CNN client project, which still hasn't been worked on yet (I've been sick for a couple of months, slowly recovering, stopped working on all projects), is that it's not really limited, you could run an actual neural network there and technically have it be part of the server, it might have to run independently from the server, but it can still be relatively reliably spawned as long as it doesn't crash, and you could hardcode behaviors for it on the server side if wished for, like making the player an epic monster boss that drops loot, might take some tweaking to make TFS do it, but that should be relatively easy by comparison.

Also I might as well reveal the first idea that came to my head with regular monster AI since it doesn't really matter: Spore-like AI that fight or befriend each other, as long as I recover from my illness in the future I will likely work on something like that for my server at some point, maybe the start of something by 2023/24?
 
Last edited:

Night Wolf

I don't bite.
Joined
Feb 10, 2008
Messages
534
Solutions
7
Reaction score
819
Location
Spain
First of all, sorry, I made a clean on my Github and didn't noticed there was still this depence on my stylegan2 repo. In the end I broke it several times and in a later stage I was running eps696 version of it - GitHub - eps696/stylegan2: StyleGAN2 for practice (https://github.com/eps696/stylegan2) Nowadays however we have already stylen3 and a lot of more repositories with cool options like training with transparency directly which are way better for our use case.
If you want to study, I've made a colab with step by step of several techniques for stylegan:

And for 3) I have made a project for detecting most relevant boundaries to get a win at league of legends. I also did the same a few years ago to be able to detect a BOT in tibia, but noticed most servers couldn't care less about baning bots as it keeps their online number high at lists.
I'll add my old repo link too below. There you have the paper (in portuguese) explaining how it works and what is the idea. But be aware this was a Proof of Concept (POC) and not a final product. Nowadays you have auto loot in most servers which would make the analysis on how fast people grab loot not a good choice for detecting a botter. Plus, ideally you wouldn't save those data in a sql server but rather in a separate NOSQL server due its potential high volumes of data and lack of need of having them structured. Lastly, I never found a way to make the source call the python scripts and receive their results as input, if we could that we could automate this antibot to run everyday in given periods and also check players on demand.

Post automatically merged:

Bonus: Derrick and Lia (yes, the one who wrote the paper) created a course to explain how stylegan2 worked and some cool stuff. You can see their slides and videos, plus you'll find their colab which I based to create mine:
 

StreamSide

Joseluis Gonzalez
Support Team
Joined
Aug 31, 2007
Messages
3,574
Solutions
50
Reaction score
1,183
Location
Arica - Chile
I wonder if it is possible to teach monsters on the server? to make them smarter and more challenging in fights....

off topic: supposedly in Forza Horizon 5 (..4 too?) the AI learns from the players and drives at a high level
this is a pretty cool idea but what kind of stuff are you going to teach the monsters? like attacking the lowest hp player? I think thats something Tibia already do (adding more intelligence to monsters) but what kind of information can we obtain from players.
 

Evalor

The Ancient One(Cahir)
Joined
Nov 19, 2009
Messages
132
Reaction score
48
Location
reversed universe
this is a pretty cool idea but what kind of stuff are you going to teach the monsters? like attacking the lowest hp player? I think thats something Tibia already do (adding more intelligence to monsters) but what kind of information can we obtain from players.
well, i think couple things could be added, but nothing what couldn't be scripted or hard coded.

but learning how does players behave in respawn... mmm. that would be interesting much more i guess.
 

Yamaken

Pro OpenTibia Developer
Joined
Jul 27, 2013
Messages
534
Solutions
4
Reaction score
427
The most important project using machine learning is an antibot. Things like auto healing and anti paralyze kills PvP and cave botting becomes a major unfair competition in a lasting mmorpg / multi user dungeon.
 

Night Wolf

I don't bite.
Joined
Feb 10, 2008
Messages
534
Solutions
7
Reaction score
819
Location
Spain
The most important project using machine learning is an antibot. Things like auto healing and anti paralyze kills PvP and cave botting becomes a major unfair competition in a lasting mmorpg / multi user dungeon.
It's incredibly easy to detect autoheal/anti paralyze. Both of them have the premise of doing something really fast after a condition is triggered.
The problem with bots is that they are reallly really consistent, and if they are not you'll most likely die or behave worst than an actual player.
So for bots to be effective, they rely on being easily identifiable. And the transformation that gives you all information you need is the standard deviation.
The standard deviation will give you a score of how consistent your values are to the average.
Let's say you're storing the miliseconds between taking a hit and healing, we expect that a bot will have an average <200ms reaction time. Now you can program your bot to wait 1s before healing you (even tibia ng would allow you to do that). That means that your average is now shifted from ~200 to ~1200. The thing is, since the standard deviation considers the delta within the values from the average you will have a very low variance;
Now, one could develop a bot that has a varying variance delay (ranging from 200~1000s) that would indeed increase standard deviation. The thing is that if you take the standard deviation of the standard deviations calculated over time, your value would still be low.

If anyone is still interested in continuing the antibot repository, let me know and I can guide you.
 
OP
OP
Source

Source

Intermediate OT User
Joined
May 31, 2020
Messages
141
Reaction score
131
Location
OpenTibia .dev
GitHub
source61
Any interest in any of these three?
  • Multi-protocol system that can be implemented on any OTS without having to recompile the server to "switch" between versions ( = potential support for picking/whitelisting/blacklisting any Tibia version in config.lua in the future).
  • Sprite generation: potentially replacing all the original proprietary sprites, making Open Tibia fully open source once and for all ( = create any sprite-art you want for free for your own project + no more copyright issues with Cipsoft, we could potentially start publishing our own games on platforms like Steam etc).
  • Open Tibia AI client for research/educational/entertainment purposes ( = fun, also could become an insanely powerful tool, but probably also really hard to achieve/make work properly).
 
Last edited:
Top