EggPlant AI ramblings
Re: EggPlant AI ramblings
aubergine, this is a way to go, just needs test for performance (like animating that way 100 units at once).
You can get some inspiration for API here (lots of material to analyze):
http://qt-project.org/doc/qt-4.8/animat ... rview.html
You can get some inspiration for API here (lots of material to analyze):
http://qt-project.org/doc/qt-4.8/animat ... rview.html
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
Re: EggPlant AI ramblings
How is the AI going?
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501
Re: EggPlant AI ramblings
The AI is going slow at the moment. I've hit a bit of a brick wall in terms of dynamic research - I can easily make it research random stuff, but I want it to research stuff in a more intelligent manner than that. I'm currently taking a brain distraction and doing some videos http://www.youtube.com/playlist?list=PL ... ature=plcp
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: EggPlant AI ramblings
May i have a word? Just some trivial thoughts.
Even though this nullbot thing of mine may be relatively strong, you shouldn't really bother with beating it in play strength. On the other hand, your focus on a transparent and well-designed code base is something i can't dream of (because of being a poor coder), but once the fundamental code is done, i could easily feed the existing well-tested data (strategy definitions) into it and thus make it as strong as i currently can. In this case, nullbot will die, having fulfilled its primary purpose of being a quick and dirty experimental proof-of-concept piece of code (hence the name), and i'll be really happy about that.
Am i right to understand the process going on here this way? (:
_________
About dynamic research ... when i added 5-way research adaptation to nullbot, the heart of the algorithm used is called the adaptation matrix. It could have been a matrix in your common mathematical sense (a linear operator transforms a vector of game situation describing numbers into a vector of decision priorities), but it turned out to be a non-linear operator at the end (but the word "matrix" still sounds cool, so i think i'd keep it).
For example, suppose we have two-dimensional adaptation: we take the number of enemy tanks and cyborgs on the board and want to find out how many AT and AP weapons we need. Let x be a vector (x1,x2), where x1 is the number of tanks and x2 is the number of cyborgs. Let y be a vector (y1,y2), representing our decision: we need to pick AP research in y1 cases and AT research in y2 cases out of y1+y2. Then if we pick a simple adaptation matrix and let y=Ax, we will have an adaptation method: AP:AT research ratio will be equal to borg:tanks ratio. This might be suitable for MG/Rockets AI, but MG/Cannons AI (that uses cannons as AT weapons) might prefer another matrix:
considering the fact that cannons work better against cyborgs than rockets do. That second adaptation matrix will make AI not stop researching cannons even when no tanks are present on the board. That's not really good. So there is certain freedom in picking the adaptation matrix, and it's not obvious which one is the best.
The same idea can be applied to adapting production ratios.
Well, i'm not saying anything non-trivial, that's just some sort of clarity that i'm relying on since recently.
Even though this nullbot thing of mine may be relatively strong, you shouldn't really bother with beating it in play strength. On the other hand, your focus on a transparent and well-designed code base is something i can't dream of (because of being a poor coder), but once the fundamental code is done, i could easily feed the existing well-tested data (strategy definitions) into it and thus make it as strong as i currently can. In this case, nullbot will die, having fulfilled its primary purpose of being a quick and dirty experimental proof-of-concept piece of code (hence the name), and i'll be really happy about that.
Am i right to understand the process going on here this way? (:
_________
About dynamic research ... when i added 5-way research adaptation to nullbot, the heart of the algorithm used is called the adaptation matrix. It could have been a matrix in your common mathematical sense (a linear operator transforms a vector of game situation describing numbers into a vector of decision priorities), but it turned out to be a non-linear operator at the end (but the word "matrix" still sounds cool, so i think i'd keep it).
For example, suppose we have two-dimensional adaptation: we take the number of enemy tanks and cyborgs on the board and want to find out how many AT and AP weapons we need. Let x be a vector (x1,x2), where x1 is the number of tanks and x2 is the number of cyborgs. Let y be a vector (y1,y2), representing our decision: we need to pick AP research in y1 cases and AT research in y2 cases out of y1+y2. Then if we pick a simple adaptation matrix
Code: Select all
/ 0 1 \
A = | |
\ 1 0 /
Code: Select all
/ 0 2 \
A' = | |
\ 1 1 /
The same idea can be applied to adapting production ratios.
Well, i'm not saying anything non-trivial, that's just some sort of clarity that i'm relying on since recently.
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: EggPlant AI ramblings
The other idea is to make a priority queue of "research exceptions", which is a series of statements similar to the following:
- If we have seen an enemy cyborg for the first time, research TMG with prioirty 3;
- If we were just attacked by enemy nexus link turret, research nexus resistance with priority 2; /*we will still research tmg first*/
- If we were just attacked by an enemy VTOL or seen an enemy VTOL factory, research hurricane with priority OVER9000;
- If nothing in particular, research laser satellite with priority 1;
etc.
Maybe the whole AI could be made of exceptions?
- If we have seen an enemy cyborg for the first time, research TMG with prioirty 3;
- If we were just attacked by enemy nexus link turret, research nexus resistance with priority 2; /*we will still research tmg first*/
- If we were just attacked by an enemy VTOL or seen an enemy VTOL factory, research hurricane with priority OVER9000;
- If nothing in particular, research laser satellite with priority 1;
etc.
Maybe the whole AI could be made of exceptions?
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: EggPlant AI ramblings
That would make him better than many human players and nullbotNoQ wrote: Maybe the whole AI could be made of exceptions?
My maps: http://forums.wz2100.net/viewtopic.php?f=10&t=9501
Re: EggPlant AI ramblings
So certain are you =/ The real question is how much readable the code will be.Giani wrote:That would make him better than many human players and nullbotNoQ wrote: Maybe the whole AI could be made of exceptions?
Maps | Tower Defense | NullBot AI | More NullBot AI | Scavs | More Scavs | Tilesets | Walkthrough | JSCam
Re: EggPlant AI ramblings
Priority based research / building / etc., is certainly a key design factor in EggPlant - almost everything uses prioritised lists.
The big problem I have with research is that currently it's not possible to write code that works out what to research based on game state without ending up with very crufty code.
It's why I started the project to try and find a way of representing the tech tree in a big spreadsheet which would define more detailed info and categorisation for each research item. If I ever manage to finish that task and then convert the data in to JSON format, so it can easily be included in to an AI, then the code that interfaces with it will be very clean and readable, although perhaps non-transparent because it won't be clear from reading the code what it will research (because that is actually defined in-game by the actions of your opponents).
The big problem I have with research is that currently it's not possible to write code that works out what to research based on game state without ending up with very crufty code.
It's why I started the project to try and find a way of representing the tech tree in a big spreadsheet which would define more detailed info and categorisation for each research item. If I ever manage to finish that task and then convert the data in to JSON format, so it can easily be included in to an AI, then the code that interfaces with it will be very clean and readable, although perhaps non-transparent because it won't be clear from reading the code what it will research (because that is actually defined in-game by the actions of your opponents).
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: EggPlant AI ramblings
I am not sure if this will help you any but my understanding is that the stats for wz were (when being originally developed by pumpkin) represented as a full on database for the purpose of editing and were subsequently exported to text files in order to allow for easier modding and reading at run time.aubergine wrote:It's why I started the project to try and find a way of representing the tech tree in a big spreadsheet which would define more detailed info and categorisation for each research item. If I ever manage to finish that task and then convert the data in to JSON format, so it can easily be included in to an AI, then the code that interfaces with it will be very clean and readable, although perhaps non-transparent because it won't be clear from reading the code what it will research (because that is actually defined in-game by the actions of your opponents).
User:dak180
Keeper of the Mac Builds
Keeper of the Mac Builds
- Rman Virgil
- Professional
- Posts: 3812
- Joined: 25 Sep 2006, 01:06
- Location: USA
Re: EggPlant AI ramblings
aubergine wrote:It's why I started the project to try and find a way of representing the tech tree in a big spreadsheet which would define more detailed info and categorisation for each research item. If I ever manage to finish that task and then convert the data in to JSON format, so it can easily be included in to an AI, then the code that interfaces with it will be very clean and readable, although perhaps non-transparent because it won't be clear from reading the code what it will research (because that is actually defined in-game by the actions of your opponents).
That is correct. It was built in MS Access db. The lead software engineer / designer burned a copy on CD and mailed it to us from their game dev studio in Bathe, England, in October 1999..dak180 wrote:I am not sure if this will help you any but my understanding is that the stats for wz were (when being originally developed by pumpkin) represented as a full on database for the purpose of editing and were subsequently exported to text files in order to allow for easier modding and reading at run time.
The running joke back then was that they got it to us (with a bunch of other useful stuff) just in time for us to carve up pumpkins for Halloween.
.
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Impact = C x (R + E + A + T + E)
Contrast
Reach
Exposure
Articulation
Trust
Echo
.
Re: EggPlant AI ramblings
Good work!
Looking forward to bashing the life out of your EggPlant AI with my friends
Looking forward to bashing the life out of your EggPlant AI with my friends
Re: EggPlant AI ramblings
@aubergine are you stopping this one?
I see you are busy with NullBot.
I see you are busy with NullBot.
Re: EggPlant AI ramblings
I'm learning a lot looking at the NullBot code and it's making me think a lot about the best approach for EggPlant.
I think the first part of EggPlant that I'm going to try and get finished in the VAULT module that keeps track of game objects. If that works OK then the rest should be relatively straightforward to implement. Main blocker on VAULT is my complete lack of RegEx knowledge so if there are any RegEx gurus around please let me know
I think the first part of EggPlant that I'm going to try and get finished in the VAULT module that keeps track of game objects. If that works OK then the rest should be relatively straightforward to implement. Main blocker on VAULT is my complete lack of RegEx knowledge so if there are any RegEx gurus around please let me know
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO
Re: EggPlant AI ramblings
Regular expressions?
Maybe this documentation will help you (pattern rules in JS should be at least very similar):
http://qt-project.org/doc/qt-4.8/QRegEx ... troduction
Though I see that they are very limited there...
http://www.regular-expressions.info/javascript.html
Maybe this documentation will help you (pattern rules in JS should be at least very similar):
http://qt-project.org/doc/qt-4.8/QRegEx ... troduction
Though I see that they are very limited there...
http://www.regular-expressions.info/javascript.html
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
The time has come, the high time, to destroy hatred in oneself.
Beware! Mad Qt Evangelist.
Re: EggPlant AI ramblings
I'm completely befuddled when it comes to regex.
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
-- https://warzone.atlassian.net/wiki/display/GO