Hi all
I want to get into factorio modding because I would like to write an AI player for factorio.
A quick google search didn't bring me to any active projects but I didn't really investigated it that thoroughly.
I know it might be too big too start with but I have quite some experience programming so I'll just learn what I need and have fun with it.
I followed some of the basic tutorials and I got a bit of the concepts but please excuse me if I mess up the terminology,
I would like to know if it is theoretically possible with the current API:
Can I create or copy the character?
Can I make that entity move around,
place objects and
craft recipes?
If no, can I programmaticly do the same for your character?
Can I load data about the everything visible by this copied character so he knows where resources and enemies are?
Yes or no on these questions would be great, I'll figure out the rest by myself.
Knowing it is there is enough.
Is a factorio AI theoretically possible?
Re: Is a factorio AI theoretically possible?
Should definitely be possible. You will probably have to simulate some things in lua (for example i don't think there's an API for making a player mine a resource and after the normal time to add the item to the inventory, reduce durability of the tool, etc)
It's not going to be easy or very performant i guess
It's not going to be easy or very performant i guess
Re: Is a factorio AI theoretically possible?
hi turoni,
welcome to the quietest board in factorio, host to a million players, yet you will never feel so alone.
lul
actually its like badger watch here. the modders spend most of their time buried deep in their burrows, completely cut off from the rest of the universe, working furiously on their own ideas. Every word they accidentally read on the forum hurts them, because its time wasted that could have been spent working on their own mods. Occasionally and briefly they come out to flaunt their new mod, and that's when you have to be ready with your spring loaded net to catch them. They will be most upset that you want to talk to them about SOMETHING OTHER THAN THEIR MODS, but thru gritted teeth they might give you a polite answer.
lul.
I think the answer to most of your questions is yes, but you better wait to get conformation from one of the badgers. Your AI will be running from your own LUA code, while you will have to find out how to plug in the inputs to factorio, but that should be easy.
Coding a good AI will be a hard and involved challenge. But if you can do it, lots of modders will want to be your friend, including me.
Have you got an empty mod template set up, ready to start?
welcome to the quietest board in factorio, host to a million players, yet you will never feel so alone.
lul
actually its like badger watch here. the modders spend most of their time buried deep in their burrows, completely cut off from the rest of the universe, working furiously on their own ideas. Every word they accidentally read on the forum hurts them, because its time wasted that could have been spent working on their own mods. Occasionally and briefly they come out to flaunt their new mod, and that's when you have to be ready with your spring loaded net to catch them. They will be most upset that you want to talk to them about SOMETHING OTHER THAN THEIR MODS, but thru gritted teeth they might give you a polite answer.
lul.
I think the answer to most of your questions is yes, but you better wait to get conformation from one of the badgers. Your AI will be running from your own LUA code, while you will have to find out how to plug in the inputs to factorio, but that should be easy.
Coding a good AI will be a hard and involved challenge. But if you can do it, lots of modders will want to be your friend, including me.
Have you got an empty mod template set up, ready to start?
Re: Is a factorio AI theoretically possible?
Thank you for the warm welcome and the warning.
I don't want to setup any expectations since I have no experience with either modding or lua but I have some ideas that I'd like to try and mainly have fun learning everything.
I skimmed trough this and it should have a lot of very usefull stuf already.
If it is not possible to emulate a player I'll skip that part for now, my main concern is to keep the bot "fair".
Meaning no magical creation of resources, everything that is placed should be taken from an inventory.
I think the item placement will work, any advice on reading info about what's on the map would be apreciated.
I've found that there are chuncks but not a lot of information about these:
can I get what entity is placed on them, can I see if it is ground, water or a resource?
I don't want to setup any expectations since I have no experience with either modding or lua but I have some ideas that I'd like to try and mainly have fun learning everything.
I am gonna start implementing the basic tutorial: https://wiki.factorio.com/Tutorial:Modd ... al/Gangsirmeems wrote: Have you got an empty mod template set up, ready to start?
I skimmed trough this and it should have a lot of very usefull stuf already.
If it is not possible to emulate a player I'll skip that part for now, my main concern is to keep the bot "fair".
Meaning no magical creation of resources, everything that is placed should be taken from an inventory.
I think the item placement will work, any advice on reading info about what's on the map would be apreciated.
I've found that there are chuncks but not a lot of information about these:
can I get what entity is placed on them, can I see if it is ground, water or a resource?
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Is a factorio AI theoretically possible?
I don't know about making a character move around and all that, but you should definitely be able to script a god type AI player, basically a base would spontaneously grow, but you could make it happen with scripts.
in fact, featured on a FFF not too long ago was a base that expanded itself via the use of scripted blueprint placements. it was all done via roboports, so given a small starting point, it should be possible to have an AI building a base like this.
in fact, featured on a FFF not too long ago was a base that expanded itself via the use of scripted blueprint placements. it was all done via roboports, so given a small starting point, it should be possible to have an AI building a base like this.
-
- Burner Inserter
- Posts: 19
- Joined: Tue Mar 15, 2016 3:37 pm
- Contact:
Re: Is a factorio AI theoretically possible?
I like the AI idea for factorio. There are some implementations that might be quite interesting.
1) Watch the bot do it. So you can program the AI, adjust some parameters and then just watch it at lets say 10 times speed.
2) In separate spawns scenario you can play with bots and maybe add some interactions between them(connect the bases with rails).
3) Add an AI to spawn with you and give him advises on what to focus on, so he would assist you building your base(like "go there add setup and outpost on that iron").
4) AI assistant that would abuse blueprints and robots as soon as he gets them to build the base of his design.
1) Watch the bot do it. So you can program the AI, adjust some parameters and then just watch it at lets say 10 times speed.
2) In separate spawns scenario you can play with bots and maybe add some interactions between them(connect the bases with rails).
3) Add an AI to spawn with you and give him advises on what to focus on, so he would assist you building your base(like "go there add setup and outpost on that iron").
4) AI assistant that would abuse blueprints and robots as soon as he gets them to build the base of his design.
-
- Filter Inserter
- Posts: 321
- Joined: Tue Dec 23, 2014 7:21 am
- Contact:
Re: Is a factorio AI theoretically possible?
Hey Turoni did you ever get anywhere with this? I would love to see something like this. But yes, as others mentioned, I can imagine it's a huuuge task