-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AI api? #72
Comments
So I've recently been playing around with this project (I've rewritten it into C#). It is possible for an AI to be written against it, but as the API stand's it is not really conductive, It is heavily optimised for fast and efficient drawing of the Map. So you would need to build a translation layer in between, to provide a higher level, more semantic API for an AI to work with. Also there are a few bits where the engine may do things which you will want the AI to have control over. The main one I can think of is the automatic placement of Hospitals and Churches, but it should be quite easy to disable that code, and then add in API's to place them exactly. |
I've taken a stab at this in this repo (find a more detailed description on reddit. I'm currently using a very slightly modified Debian package of micropolis-activity (find it here), and sending build commands from python over tcl. I only had to duplicate some of the game's build-functions, making them editor/gui-independent, and then make them available as tcl commands. I'm very interested in how one might speed this process up, though, since training is quite slow. I'm currently trying to compile MicropolisCore - if I could have the same commands I do now, but available directly to python via wrapping, rather than via the python expect module and tcl, I imagine there would be a speed increase. After all, if you can run the simulation ultra fast (via, i.e., the tcl command "sim Delay 0"), then I don't see why you shouldn't be able to build/destroy a road or zone once-per-timestep in the simulation, rather than over the course of a few hundred in-game years, as my current solution using tcl permits. |
I'm interested in trying to build city planning AIs - do you think micropolis would be conducive to an api for developing AI players?
The text was updated successfully, but these errors were encountered: