• 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!

artificial intelligence in a monster?

exanime

I´m learning Lua
Joined
Oct 24, 2011
Messages
40
Reaction score
3
Location
Bogota, Colombia
Hi Tibians


I come to ask a question


Is it possible to create an artificial intelligence in a monster?


I've been studying engineering, and I've wondered if this is possible.


It is possible that the monster learns of the attacks of the players, and also is becoming stronger and strategist, is just an idea.

Or maybe a map maker based on Tibia, create some automatically, maybe you will explore a lot on this topic, what do you say?
 
yes its possible in theory
what do you mean create some automatically, you mean map generation?
zbizu already has something in the works for it but it's nowhere near done
 
Because the artificial intelligence learns from what you see, because the algorithm would generate a map about what you learned, I would like to see the subject, and what do you think about the monsters?
 
I think you can implement it in lua(with proper bindings to C++ Core). Are you talking about neural networks?
Real A.I would be awesome to Tibia because most of time the grinding is pretty boring.
 
You can build a lot of useful things in lua, if you can dream it up and know how to lay it out in code you can create just about anything your heart desires in lua.
 
You won't make a AI that do same work as a professional mapper (well... theoretically it is possible xD), but you can use programming to make your mapping easier and faster for example algorithm for random continent generation.
Cool idea would be world-life simulation. For example you can make algorithm which creates empty map only with continents, rocks and forestest. Then you simulate "life" by adding bots that make decisions and are able to use resources like wood from trees, rocks from mountains etc. and with that resources they are able to build a cities, also other inteligent beings (monsters) get born in selected area and then spread around map - if you do everything right this simulation will create a great map with it own story :D
Here is AI Ant-Colony example:
 
Nice I like this community also likes to think about deep learning.
Currently I'm testing teaching AI how to code with speech recognition. Would be awesome to code by speaking in my own terms.

In regards of monsterAI, we don't need that complicated AI for monsters. Just for every spell what players can use, code in a counter reaction what would be best to do for monsters and that would be good enough to make AI nearly impossible outplay.
 
@Keal Atis
If you're interested in games+machine learning then here's guy that tecahed bot how to drive in gta V via machine learning but tbh as you see, shit is nowhere to be at least decent (yet? probably need more 'training sessions, but still)

Example:


Part1
 
I was thinking of making an "Evolution" mechanic.

Where Monsters could evolve (as a species) to decide on more health, more damage, etc.

You basically need 2 things to make "Evolving AI".
  1. Variables that can change
  2. A Measure of success
So for example:
If you let monsters have randomized stat points of health, damage, movement speed, etc.
Then you have it remember how much damage a monster was able to do before it died.

The monsters that did the most damage before death, would be selected as "Parents" to the next generation of monsters that are spawned.
Then you could add other things, like "Can push boxes", "Can push monsters", etc.

So, one monster in a cave far away from town might sacrifice the ability to push boxes, to have more health and damage.
But a monster close to town might end up selecting the ability to push boxes, because players more often bring Boxes with them when hunting to avoid damage.
 
I can think that, Flatlander has a good idea oriented evolutionary algorithms, which is good too, thinking that a simple rat, every time learn of a behavior and maybe you can raise or lower floors, move boxes, and even give you the opportunity To learn new spells, however I would like to know how to start structuring it, since I do not think it only works in the LUA language, but in C ++, it would also work for the protection of DDos attacks, or detection of bugs automatically, networks Neuronal and genetic algorithms can be applied here, only that no one has wanted to enter that field oriented to Tibia. Perhaps in the future even bosses will learn from player attacks and strategies and try to replicate them. I like to talk about these issues, and I want to apply it but I do not know how to start. Thank you
 
Stop wasting your time trying to improve something that is not even yours. If you are going to spend so much time and effort on something, do it on some that has your name on it. It is not even legal to have an alternative tibia server, why pushing it? Never step on the great man shoes.
 
I'd like to shift the focus a little towards the practical side:
What I like about this subject, to start with, is that both NPCs and monsters, but monsters in particular, ought imo. to have their base functions and capacities extend way beyond what they are now in OTs.
I think they should at minimum have some functions/methods to perceive/respond directly to their environment and self conditions, rather than just being these dummies that they are right now casting spells based on random intervals and moving based on fixed ranges + a fixed hp% flee threshold...
I mean monsters still aren't even coded in lua, but are simply XML files with fixed attributes, right?
So I think the first step here would be to actually allow monsters to be coded in a coding language rather than being mere bricks with some nice-looking but fixed colors.

@exanime
In regards to AI map making: it's possible, but highly speculative. I think it's better to start small, like making tools to simplify map making, like Remere has done with RME compared to SME.
I don't know what RME's current capacities are, but you could build a base for RME plugins if it doesn't already exist and then start building a plugin that performs macros or tweaks the current tools based on parameters or config values, acting out or letting algorithms tweak behavior on cue.
Then you could extend it further as you go, adding in more complex sequences/subroutines including if you like metaprogramming and a storage capacity (json?) to make the plugin actually act like AI if that's your goal.

@Stellow
OTs are 99% copyleft. The remainder, such as artwork, is possible to overcome for those motivated enough.
 
Last edited:
why stop there? provide full AI to every creature on the map, attacks others not of it's kind, levels up and or/organizes in groups to hunt bigger creatures?

and... Why Stop There? have them loot other monsters they kill and wear their loot i.e. gain status bonus (and drop them when they die).

but, Why. Stop. There?? they get so advanced they move in to attack whole cities.

AND WHY STOP THERE!! they set up traps to kill humans!

yep, it's all "possible" in computer science... it's just not feasible/worth investing in for a small group of people?
 
I mean monsters still aren't even coded in lua, but are simply XML files with fixed attributes, right?
I know at least 5 servers which have custom AI made in Lua.

why stop there? provide full AI to every creature on the map, attacks others not of it's kind, levels up and or/organizes in groups to hunt bigger creatures?
quite easy to implement, just a simple table to increase spell powers.
Most servers on TFS 1.x can make that with like 5 lines of code.

Why Stop There? have them loot other monsters they kill and wear their loot i.e. gain status bonus (and drop them when they die).
In my game some monsters already do that

Why. Stop. There?? they get so advanced they move in to attack whole cities.
because that would be like bringing free gear to towns so players dont need to go out and explore. no ty.


These are all lower level sciences. Real things are hidden in deep learning.

For example map creating.
You feed in all the created maps already.
example 200x200 tile areas. You show all these thousand pictures for example and let it then output AI own generated maps.
You then say what are bad and what are good and fine tune a next layer with these new selected pieces.
Eventually you are going to end up with quite decent maps with just button clicks and by choosing themes and itemID's

Making super intelligent monsters wont be necessary. You will still need to keep coding more unique spells into game and keep fine tuning endlessly.
 
Reaaaally? I'd like to see one of your servers in which a party of Minotaur kind organize and go hunt giant spiders and dragons in PoH. Seriously, I would pay to see that live.

Genetic argorithms are nice, yes, but I think you're underrating implementation problems too much :)
 
Is TFS 1.2 as an engine even optimized to do all these sorts of complex processing? i mean.. TFS (and tibia in general) won't trigger onThink() function on monsters without having a player nearby to conserve CPU power. imagine if you lifted that limitation in a heavily developed and populated server....
 
Is TFS 1.2 as an engine even optimized to do all these sorts of complex processing? i mean.. TFS (and tibia in general) won't trigger onThink() function on monsters without having a player nearby to conserve CPU power. imagine if you lifted that limitation in a heavily developed and populated server....

Exactly. Which is why I said implementation problems are interesting (at scale).

There's no challenge in making your sole targeted 5 group of monsters smarter, but try it with 10k creatures on the map?
 
Back
Top