Author Topic: AI Assist  (Read 12665 times)

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 30
  • Posts: 205
AI Assist
« on: September 19, 2012, 10:12:56 PM »


AI Assist:

Having trouble keeping up with Infected or Merchant's too-quick and inhuman response times? You can only move and click your mouse so fast!

The solution is AI Assist.

AI Assist is a suite of buttons that you merely have to place your mouse over to perform some basic tasks in seedling management. Do you want all your seedlings to gather on a specific asteroid? Just move your mouse over the appropriate button and instantly all your seedlings obey...no clicking of the mouse to slow you down! Waiting for your asteroid to get enough seedlings to plant a tree? No need to keep clicking on the asteroid to check- just place your mouse over the appropriate button and the tree will be planted as soon as possible!

In the pictue above, the AI Assist Panel is located in the bottom Left of the screen. This panel can be moved to anywhere on screen you desire by clicking and dragging with the mouse. It consists of these 12 buttons, 10 of which are functional:



From left to right:

Button 1 activates the "Mutant AI". This AI will take control of your seedling Empire and fight your battles for you. If you choose to use the Mutant AI, you should activate it as soon as possible as each second of delay allows the enemy to gain the advantage. You can activate or deactivate the Mutant AI at any time, however, and it will do it's best to defend the Empire.

Button 2 will evenly spread out your seedlings from whatever owned asteroid you have "selected" to neighbor asteroids with no trees and less than 10 enemy.

Button 3-6 will gather your seedlings from the indicated map "Quadrant" (see Button 10) on any asteroid with less than 10 enemy seedlings and send them to the asteroid you have "selected".

Button 7 will gather all the seedlings from the neighboring asteroids of your "selected" asteroid and send them to the "selected" asteroid leaving 5 seedlings on the neighbor asteroids.

Button 8 will plant a tree on any asteroid that has no trees but where you have enough seedlings to plant a tree. It will also gather all seedlings from your entire Empire and send them to the "selected" asteroid. It will attempt to only gather those seedlings that are not otherwise engaged in balttle.

Button 9 will plant a Dyson Tree on any asteroid that needs trees where you have enough seedlings to plant a tree, regardless of what asteroid you have "selected".

Button 10 will display your Empire divided into 4 quadrants evenly-divided by number of asteroids you own. Use this to determine which Quadrant you wish to control with Buttons 3-6.


Explanation of Attachments:

Attached are 4 playable maps and 2 code files.

AIAssist V1 Basic Edition is the code for inserting AIAssist into a regular-play map. It will look like the panel above.

AIAssist V1 Programmer Edition has two additional buttons of interest to map-makers. It also has more options for Button 10 that will allow you to watch the Mutant AI thought-process in action.

AIAssist Demo Map is a playable map where you can test out the AIAssist in an actual match against Infected or Merchant AI.

AIAssist Demo Map Programmer Edition is the same map using the Programmer Edition instead of the Basic Edition.

The AI War Maps are Annik's maps where you can watch Mutant fight Infected or Merchant or play with the AIAssist.

In any instance where you wish to use the Mutant AI, you should activate it immediately upon map-start as every second of delay degrades it's performance!

Also, if you wish to install AI Assist into your own map, do not use code from the playable maps as that code may have been altered for demonstration purposes. Use only the original code contained in the code-files.

Have fun!

I will be away from my computer for a month or so, so if there are any problems or questions it may take me a while to respond!

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: AI Assist
« Reply #1 on: September 20, 2012, 12:19:25 AM »
I found a problem, not exactly critical, but an annoyance: the tab keeps moving when I click around. Also, maybe you want to add a text to appear whenever you hold over a button? You shouldn't need to come back to this page each time :P

Also, maybe it's better to have this system as a mod, so you can use "dofile("mods\\AIAssist.lua")" or something? The codes are quite big and it would be better if a programmer can just insert the dofile and the function calls and let the user install this and the map they wanna play(it's seriously not that hard to make a folder named "mods" in the Eufloria directory and insert this!)? :)

Lost Seedling

  • Shrub
  • ***
  • Thank You
  • -Given: 9
  • -Receive: 30
  • Posts: 205
Re: AI Assist
« Reply #2 on: September 20, 2012, 03:41:58 AM »
Quote
the tab keeps moving when I click around

It shouldn't be in the way where it is. It took me a while to get used to NOT clicking on the icons but just mousing over them. This was a design consideration I debated with myself for quite a while. If I made the icons clickable, I could make a number pad-like layout and then it could be as large as needed and hold many buttons. But part of the reason for it's creation was to avoid having to click the mouse so much! So in order to do that, the button pad had to have each button accessible without crossing any other button in order to reach it with the cursor. I think if you play with it for awhile you will get used to NOT clicking on it, as I have.

Quote
add a text to appear whenever you hold over a button?

I also considered this possibility, but once the button functions are understood, you don't want to have to keep looking at the text explaining its function. Then I considered having an on/off text button, but of course then that is sort of a wasted button! It would be easy to add multiple button-consoles, like one for each corner or whatever. One could just be devoted to mundane house-keeping functions like text/instructions, on/off features, etc. As for text in general, the button interface would be very nice for adding text to a game that may need explanation of other features of the game that the player could toggle when needed.

Quote
maybe it's better to have this system as a mod, so you can use "dofile("mods\\AIAssist.lua")" or something? The codes are quite big and it would be better if a programmer can just insert the dofile and the function calls and let the user install this and the map they wanna play(it's seriously not that hard to make a folder named "mods" in the Eufloria directory and insert this!)

Sorry Aino, I don't speak that language and have no idea what you're talking about! But- I agonized long and hard over how to make customization and modification easy for a programmer who wishes to use this system. I'm afraid I'm not knowledgeable enough about programming to figure out a good way to do it, or how it would apply to the limitations inherent in Eufloria. The problem I have with some of the things I've seen in this forum is that they are so advanced code-wise, someone like me who is trying to learn basic programming or their first map can't make use of them (it took me a few days to figure out how to sort an array!). If something is so advanced that only a few people here can understand it, it won't be used again. But, on the other hand, if something is simple but too unwieldy, it also won't be used. Well, all of this stuff is submitted as basic ideas anyway, so if this inspires someone like you to improve upon it or come up with something better, it won't be a waste!

My goal here is always first to provide something that others may find entertaining. Second, to make something that someone may find useful or inspire them to create something better- so that I can enjoy what they've done!

Aino, if you think this general concept has future value and care to improve upon it, please feel free to do so! I know all of us here in the mod-section of the forum are hoping the new PC version will be mod-able and eventually enable us to make new maps, and maybe this idea is something that would translate well into the future.

That being said, if anyone likes the AI asssit and would like specific functions changed or added, or ANY suggestions for improvement, let me know and I'll put up another version if I can do it. Sorry Aino, I don't understand how to incorporate a dofile or what that even means. I TRY to keep things simple.


Pilchard123

  • Tester
  • Old Oak
  • ****
  • Thank You
  • -Given: 4
  • -Receive: 24
  • Posts: 932
  • Eufloria: Yes
Re: AI Assist
« Reply #3 on: September 20, 2012, 04:35:27 AM »
Basically, it will read in the contents of a Lua file and then execute them.

Anyway, dofile() is sloooooooooow.

Aino

  • Ent
  • ******
  • Thank You
  • -Given: 4
  • -Receive: 30
  • Posts: 1,527
  • Eufloria: Yes
Re: AI Assist
« Reply #4 on: September 20, 2012, 04:53:58 AM »
Basically, it will read in the contents of a Lua file and then execute them.

Anyway, dofile() is sloooooooooow.

But it's only in the beginning you use it, so it's not much of a problem, now is it? Everyone can wait in the beginning of a map, but nobody wants lag in the middle of the game. Unless I'm wrong and it collects data from the file instead of importing it to the compiled coding...