An additional significant purpose for the AI is to trigger planetary defenses against roving unarmed monsters like Floaters, Small Krill and Small Snowflakes, before they get big enough to make problems, since we have not yet coded up a "monster hunter" military mission for them yet.

have they the same impact on the building costs than any other spaceship

Yes they do

If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

They seem to be just a hack for the above monster killing effect and should be removed entirely and replaced with something else less 'hacky'.
But I'm not a developer so I don't get a vote and I'm sure there are other things in the game that are more important keeping them busy.
I'm also aware that replacing it with something else will not be quick and easy. It's more complex than it seems.