[Mod] Alive AI V26.32 [aliveai]

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [WIP] Alive AI [aliveai]

by AiTechEye » Post

in V1:
+spawn bots on dirt, sand,snow
changed spawner
+death anim and smoke if its in lava/fire
+max 5 bots (spawns by it self / new bots, does not affect already existing bot)
+max 30 bots (does not affect already existing bot)
+customizing

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V1.1 [aliveai]

by AiTechEye » Post

Now they are bit more fun
V1.1:
+ targets to function customizing
+ abort pathfinding when punched
+ talking
+ call help if needed (same team) (players can also do <name> come)
+ fight with .type="monster" or enemies
+ selecting targets randomly
+ can run
+ jump over holes (but still not deeper then 7)
+ fixed speedbug with mobs redo
+ show health when hurted
Last edited by AiTechEye on Tue Jan 10, 2017 16:56, edited 1 time in total.

Chibi ghost
Member
Posts: 845
Joined: Fri Jan 08, 2016 21:17
In-game: Ghost

Re: [Mod] Alive AI V1.2 [aliveai]

by Chibi ghost » Post

cool

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

Re: [Mod] Alive AI V1.4 [aliveai]

by Diamond knight » Post

What I meant is make mining take time and they be able to craft and use tools, and swords making them do more damage (see creatures mod pack)

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V1.4 [aliveai]

by AiTechEye » Post

got it, mining will take 3x longer time (will not be dependent of different tools, because it would curse problems)

will try to make it pickup and use tools damage, check for damage_groups = {fleshy}
would be better if it was possible to use tools like players (tools wihtout .on_use)

looks like players in the creatures mod are attached to mobs,so its not mobs itself that using tools.

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

Re: [Mod] Alive AI V1.5 [aliveai]

by Diamond knight » Post

suggestion: saying help in chat will have some random teammates come to your aid (typing in a cumbersome "name" is hard in battle), and there should be more teams with different "personalities" (team greifer will deliberately greif your (and other bots) houses (setting to disable) (team pacifist will fight only as a last resort), and an invisible indestructible block built in houses that will tell bots there is a house there, and bots will hide in a house at night if a mobs mod is detected

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V1.6 [aliveai]

by AiTechEye » Post

ok, like "<team> come" only team-friendly will come, (like bots it self does)
+ more characters/kinds of bots, but in separate mods (in a modpack).

i want them escape from or hide in darknes, like a "dark .
afraid" bot that are inside a darknes could seek to light, its home position could support that (if it have one)

should houses be generated?
and some new bots get free random items?
what do yuo think?

1.6
+show hp 0.5s longer
+show hp when eating
fixed eating (eat what it need and not everything it have)
+check if they have something to eat after they got hurted (delay 2s) +food databas
changed can spawn up to 50 bots, and 7 by self (becaouse they got better cpu using)
+attacks escape target if they get full health

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

Re: [Mod] Alive AI V1.6 [aliveai]

by Diamond knight » Post

I think the mod could use some more variance in house shapes too (and the possibility for the npc to choose to not put glass or bottles or furnaces or chests in the house if they give up on getting the blocks too much) and maybe instead of that invisible block it could place beds in its house and move to beds that have light around them at night, also I saw the original TODO list, when will the bots operating (and maybe placing in its house) shops, it would be good for singleplayer (making huge minemarts would be fun with this)

Also it would be cool if the bots could be affected by the enable creative mode and disable damage settings, and if the greifer could operate TNT and flint and steel (another setting for those who want the greifers but do not want burning jungles)
And maybe a meta string for privs would be cool (eg. /grant w6ghs7 ban, and that not could "ban" greifer bots)

User avatar
davidthecreator
Member
Posts: 452
Joined: Mon Aug 18, 2014 19:48
GitHub: daviddoesminetest
In-game: DavidDoesMinetest
Location: Lithuania

Re: [Mod] Alive AI V1.6 [aliveai]

by davidthecreator » Post

yay! i'm not forever alone anymore!

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V1.6 [aliveai]

by AiTechEye » Post

the currently houses are random generated code, and the furnitures + windows too, its no idea to add big buildings, because the bots have a tendency to be lazy + cant handle block rotations

the aliveai mod is meant to be a api that only should include important functions, and functions that makes the bots humanly or smart

its made to make it possible to create bots outside the mod and add buildings but the function is messing (forgot to update a old function and more)

everything im doing is branching to more tasks so I will answere later.
yay! i'm not forever alone anymore!
thats are one of the points with the mod :D

Robsoie
Member
Posts: 104
Joined: Fri Apr 29, 2016 16:22

Re: [Mod] Alive AI V1.6 [aliveai]

by Robsoie » Post

Hello,

This sounds very interesting, but i am puzzled in how to get any bot starting to do something.
Starting in creative, in a region covered by snow, i opened the inventory and saw 2 news item, a bot spawner and a bot spawner 2 that seems to spawn 2 differently colored bots.

After that bots sometime randomly walk, sometime may dig a block and nothing else, at a time a bot asked for a chest and i dropped one that it took, i then dropped pickaxes/axes and they took them, another one asked for a vessel:steel bottle, didn't provided one.

But since then for several days they do nothing else, only random walk or sometime randomly digging a block.
One of them by randomly digging seems to dig a toward the depths, though very slowly, probably a couple of blocks each days.

I regularly see "failed to update cost map" red messages during gameplay, but never i see those bots trying to build anything like in the screenshot of the 1st post.
aliveai:bot_spawner / aliveai:bot2_spawner
use to spawn the default ai mobs, you can remove or change it from the init.lua

aliveai:building
use to generate building inspections code that the mobs can use

aliveai:genbuildingtool
generate random buildings (same as bots builds)
I thought those were console commands, but / them in the console only end with invalid commands message, so i must say it's rather puzzling, any help ?

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V1.6 [aliveai]

by AiTechEye » Post

The bots will mine stuff that they need, and randomly ask for stuff (so they dont need to make [lazy bots + more humanly])
the "needed" stuff is timed and will be ignored one by one after about 200s or they will search for the stuff for ever.
.
there are 20% chance to find blocks (saves a lot of cpu), then it takes about 3s to dig it.
Diamond knight wrote:
What I meant is make mining take time
When they not find enough materials to build the basic part of the house, will they skip or exit that project,and only walk randomly (corrently for ever)
and fight/fly with/from other teams/monster,pick up items...

if they are in a build process, and dont find a path and cant reach the position, will they skip that step to next time, if they get problem once again will they walk randmly, and skip steps, one by one untill it finds a path or if they can reach it.

the green "sam/player friendly" and red (Jezy/none-player friendly) bots will fight when they detect each other.
the red ones will attack mobs and players when they are hurted (hunt for food) the green only mobs.


the red text is a error message from the minetest core (minetest.find_path) if fails to update somehow (i would be happy if the devs just could hide that error)

you can put bots into a dev mode, just say /aliveai status=true or change status=true in the init.lua, there are also some hidden tools


corrently im working to make bots escape or hide in darknes (like if they are inside a cave or are outside in night) [70% done]
and fixing errosr that makes we cant make bots outside the mod + fix a house-code-gen-tool.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V1.7 [aliveai]

by AiTechEye » Post

Now its possible (or at least fixed) to customize / make bots and buildings from other mods

an example: (this is a mod)
download/file.php?mode=view&id=8579


1.7
+escape or hide in darknes
+bots spawn is based on light (would be nasty to place a darkness afraid bot in a dark cave :P)
fixed create bots outside the mod
fixed aliveai:buildingtool
changed name "aliveai:buildingtool" to "aliveai:copy"
+aliveai:genbuildingtool check if area is able before spawn
+use set_node instead of place_node when there are not .after_place_node() or .on_construct()
+ changed colors of the tools
Attachments
alien.zip
(851 Bytes) Downloaded 261 times

User avatar
TheReaperKing
Member
Posts: 531
Joined: Sun Nov 22, 2015 21:36
Contact:

Re: [Mod] Alive AI V1.7 [aliveai]

by TheReaperKing » Post

I know I haven't posted a lot but I am closely following your mod. I am absolutely fascinated by your AI work! The two NPCs throwing insults at each other was so hilarious. One my students killed one and said "I'm a murderer". Great stuff. Thank you for your continued awesome work!
Become A Real Life Superhero - http://SuperheroHill.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V1.8 [aliveai]

by AiTechEye » Post

:D

1.8
+build to reach targets (towers and bridges)
+timed paths (makes they wont stuck for ever)
fixed crash: light based spawn
+hurts by light, depends on its position, like stuck in a dark cave in underground)

Looks like nothing can stop this guys anymore
risking its life to get some sand :P

Image
Attachments
werwer.png
werwer.png (516.34 KiB) Viewed 1470 times

User avatar
lordfingle
Member
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle
Location: Australia
Contact:

Re: [Mod] Alive AI V1.8 [aliveai]

by lordfingle » Post

I'm very excited about the potential of this mod! I wish I'd had known about it earlier.

There's a crash here:

local p2={x=pos.x+x,y=pos.y+y-1,z=pos.z+z}
local p3={x=pos.x+x,y=pos.y+y+1,z=pos.z+z}
local node2=minetest.get_node(p2)
local node3=minetest.get_node(p3)
local l2=minetest.get_node_light(p)
if not (node2 or node3) then return end
---CRASH>>>if ((self.light>0 and l2>light) or (self.light<0 and l2<light))
and minetest.registered_nodes[node2.name].walkable
and minetest.registered_nodes[node3.name].walkable==false
and (aliveai.visiable(self,p) or (math.random(1,5)==1 and aliveai.creatpath(self,pos,p,nil,true))) then
aliveai.showpath(p,2)
light=minetest.get_node_light(p)
lightpos=p
if ((self.light>0 and light>=15) or (self.light<0 and light<=0)

xxxxxxxxxxxxxxxxxxxxxxxxx\mods\aliveai\event.lua(56): attempt to compare number with nil


Apparently get_node_light returns nil for some reason......
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V1.8 [aliveai]

by AiTechEye » Post

The light has been messing for a while, but its maybe fixed, the bots could at least stand into unknown nodes in darkness.

It checks for light in boxes like this
and compare higher/lower lights, and checks if it can see the light, and randomly check if it can find paths to the light.
if it dont find light, will it be hurted (if its on -y or +y) or if there its traped will the checking be aborted and be hurted

Image
Attachments
11y1.png
11y1.png (961 Bytes) Viewed 1470 times

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V2 [aliveai]

by AiTechEye » Post

Its not easy to escape from stalkers, but just try to get your self away from this guys!
Image
Attachments
screenshot_20170123_232429.png
screenshot_20170123_232429.png (495.14 KiB) Viewed 1470 times

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

Re: [Mod] Alive AI V2.01 [aliveai]

by SAMIAMNOT » Post

I'm having trouble with the mod, a "could not load mesh 'character.b3d" error came up. I read somewhere that that means that the file doesn't exist, and sure enough, its not in the mod. Could you please add it?
I test mines.

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V2.01 [aliveai]

by AiTechEye » Post

the mod are usig the standard player model, in
"games\ minetest_game\mods\default\models/character.b3d"

its not a model i have made, a quick fix is to change the model in aliveai/aliveai/init.lua

what minetest version and game are you using?

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

Re: [Mod] Alive AI V2.02 [aliveai]

by SAMIAMNOT » Post

I was using my own game Clonecraft (I’m considering adding it to the game). I fixed it by copying the character.b3d file to my default folder. However, I am getting an error regarding the punch function...I will post error logs when I test it again this afternoon. This is one cool mod!

EDIT: Here's my error.

Code: Select all

2017-01-25 13:46:09: ERROR[main]: ServerError: Lua: Runtime error from mod '*builtin*' in callback ScriptApiEntity::luaentity_Step(): Double fault error from mod '*builtin*' in callback ScriptApiEntity::luaentity_Punch(): error in error handling
2017-01-25 13:46:09: ERROR[main]: stack traceback:
2017-01-25 13:46:09: ERROR[main]: 	[C]: in function 'punch'
2017-01-25 13:46:09: ERROR[main]: 	...(1)\minetest-0.4.13\bin\..\mods\aliveai\aliveai/base.lua:485: in function 'punch'
2017-01-25 13:46:09: ERROR[main]: 	...1)\minetest-0.4.13\bin\..\mods\aliveai\aliveai/items.lua:584: in function 'pickup'
2017-01-25 13:46:09: ERROR[main]: 	... (1)\minetest-0.4.13\bin\..\mods\aliveai\aliveai/bot.lua:18: in function <... (1)\minetest-0.4.13\bin\..\mods\aliveai\aliveai/bot.lua:2>
Last edited by SAMIAMNOT on Wed Jan 25, 2017 18:47, edited 1 time in total.
I test mines.

User avatar
Diamond knight
Member
Posts: 475
Joined: Sun Apr 19, 2015 19:50
GitHub: Diamondknight
In-game: Ferrumprinceps
Location: Chilling in Constantinople
Contact:

Re: [Mod] Alive AI V2.02 [aliveai]

by Diamond knight » Post

the explosion sounds are almost deafeningly loud, could you tone them down a bit

User avatar
lordfingle
Member
Posts: 65
Joined: Sat Apr 04, 2015 09:21
GitHub: eidy
IRC: lordfingle
In-game: lordfingle
Location: Australia
Contact:

Re: [Mod] Alive AI V2.02 [aliveai]

by lordfingle » Post

I am getting a runtime error that pops a dialog. This could be the same as the error that Sam is reporting.

Because I am "fortunate" enough to have a debugger etc I can be very specific about what the error is, but I don't know exactly where it's happening in lua.

Bascially it is hitting this assertion:

serialize.h:
inline void writeF1000(u8 *data, f32 i)
{
>>>> assert(i >= F1000_MIN && i <= F1000_MAX);
writeS32(data, i * FIXEDPOINT_FACTOR);
}

Stack trace is:
> minetest.exe!writeF1000(unsigned char * data=0x15f0e598, float i=-nan(ind)) Line 278 C++
minetest.exe!writeF1000(std::basic_ostream<char,std::char_traits<char> > & os={...}, float val=-nan(ind)) Line 371 C++
minetest.exe!gob_cmd_update_position(irr::core::vector3d<float> position={...}, irr::core::vector3d<float> velocity={...}, irr::core::vector3d<float> acceleration={...}, float yaw=-nan(ind), bool do_interpolate=true, bool is_movement_end=false, float update_interval=0.100000001) Line 58 C++
minetest.exe!LuaEntitySAO::sendPosition(bool do_interpolate=true, bool is_movement_end=false) Line 729 C++
minetest.exe!LuaEntitySAO::step(float dtime=1.42799973, bool send_recommended=true) Line 334 C++
minetest.exe!ServerEnvironment::step(float dtime=1.42799973) Line 1369 C++
minetest.exe!Server::AsyncRunStep(bool initial_step=false) Line 566 C++
minetest.exe!ServerThread::run() Line 102 C++
minetest.exe!Thread::threadProc(void * param=0x02162530) Line 252 C++


It seems to be happening because you are setting yaw to "-nan(ind)".

I thought it was happening in your bot onstep code. Basically anywhere where you are setting yaw.

I am ridiculously excited about the potential of your code. I think it's something every minetest game needs.
----------------------------------------------------------------------------------------------
Team Lead on "eidy- Love learning"
I like reading, walks on the beach and building edutech experiences in lua (Find out more in this post)
"Coming together is a beginning; keeping together is progress; working together is success." - Henry Ford

User avatar
AiTechEye
Member
Posts: 1000
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: Sweden

Re: [Mod] Alive AI V2.03 [aliveai]

by AiTechEye » Post

SAMIAMNOT: fixed, another guy had that problem too, i think its a core thing when a bot punches an item.

Diamond knight: its reduced from 5 to 0.5, tell if its still too high, otherwise i think its the treble that is messing.

lordfingle: we testing if it helps by add type(yaw)~="number" and set yaw to 0
and yeah, in the most games are there some kind of bots that brings life to the game, and minetest are missing it yet.
its fun to see they live there own life, and an dont do exacly what it is made for.

like in yesterday, the white/pink character, its fight property is missing.
i puted him in a box with a nuke/gassman into a cliff, there was no way from there. and would blow up after about 10s.
Then just before the exploded, the guy diged under the gassman so it fell down and saved its life, even it dont was made to do it, HOW!?

User avatar
SAMIAMNOT
Member
Posts: 416
Joined: Wed Sep 03, 2014 00:51
In-game: notanewbie
Location: Desert

Re: [Mod] Alive AI V2.03 [aliveai]

by SAMIAMNOT » Post

I Had another glitch when ten NPCs tried to gang up on a Terminator...

Code: Select all

2017-01-26 16:29:58: ACTION[ServerThread]: LuaEntitySAO at (-43.15,8.37156,110.85) punched by LuaEntitySAO at (-42.3375,8.5,112.275), damage 4 hp, health now 196 hp
2017-01-26 16:29:58: ACTION[main]: Irrlicht: Could not open file of texture: character.png
2017-01-26 16:29:58: ACTION[ServerThread]: LuaEntitySAO at (-43.1121,7.1,110.896) punched by LuaEntitySAO at (-42.3375,8.5,112.275), damage 4 hp, health now 196 hp
2017-01-26 16:29:58: ACTION[ServerThread]: LuaEntitySAO at (-42.3375,8.5,112.275) punched by LuaEntitySAO at (-42.3375,8.5,112.275), damage 8 hp, health now 12 hp
2017-01-26 16:29:59: ERROR[main]: ServerError: Lua: Runtime error from mod '*builtin*' in callback ScriptApiEntity::luaentity_Step(): Double fault error from mod '*builtin*' in callback ScriptApiEntity::luaentity_Punch(): error in error handling
2017-01-26 16:29:59: ERROR[main]: stack traceback:
2017-01-26 16:29:59: ERROR[main]: 	[C]: in function 'punch'
2017-01-26 16:29:59: ERROR[main]: 	....\games\Clonecraft\mods\aliveai\aliveai_threats\init.lua:229: in function 'on_punching'
2017-01-26 16:29:59: ERROR[main]: 	...3\bin\..\games\Clonecraft\mods\aliveai\aliveai/event.lua:466: in function 'fight'
2017-01-26 16:29:59: ERROR[main]: 	....13\bin\..\games\Clonecraft\mods\aliveai\aliveai/bot.lua:14: in function <....13\bin\..\games\Clonecraft\mods\aliveai\aliveai/bot.lua:2>
I test mines.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 22 guests