|
|
|
 |
|

February 23rd, 2009, 03:20 PM
|
 |
Colonel
|
|
Join Date: May 2005
Location: Kansas, USA
Posts: 1,538
Thanks: 289
Thanked 194 Times in 94 Posts
|
|
Re: Perking up the AI
Quote:
Originally Posted by VedalkenBear
If someone could explain the underlying logic of SemiRandom, I could try programming it in Java.
|
I would have great sympathy for anyone trying to follow SemiRandom's code. I am usually a very disciplined programmer and a stickler for meaningful variable names and verbose documentation, but when it came to this project I really just started typing until it worked. Then I added some more spaghetti on top of that lumpy mound. What a mess.
The RanDom front-end is not so bad on the code side, but I left out a ton of much needed error checking and the like. That is what happens when you don't know where you are going until you get there.
|

February 23rd, 2009, 06:47 PM
|
National Security Advisor
|
|
Join Date: Nov 2006
Location: Oxford, UK
Posts: 5,921
Thanks: 194
Thanked 855 Times in 291 Posts
|
|
Re: Perking up the AI
I understand that Python is mega-lovely. I'm a big fan of Perl, and apparently Python is nicer.
http://xkcd.com/353/
|

February 23rd, 2009, 09:07 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Perking up the AI
Quote:
Originally Posted by VedalkenBear
If someone could explain the underlying logic of SemiRandom, I could try programming it in Java.
|
Here is the original page from the old Dom2Minions site.
http://www.dom3minions.com/~minion/SemiRandom.shtml
The program is based on the fact that map commands allow much more management than most maps use. Some, such as Faerun, have programmed provinces with logical population choices, defenders, magic sites, name, etc. Those are great (and way too few) but the pro and con is that there is some loss to replayability. My totally chaoticized maps are called "interesting" but they can be irritating in the total lack of logic in what it throws into the map.
This projects concept is allowing all players to design a province. Such as: "The Shire" with a population of hoburgs, magic sites boosting supplies, and some interesting defenders. These are converted to Dom3 map commands and placed in a file where the name of the file includes codes to specify something such as "farmland" to control its placement.
So the SemiRandom program reads a map file and randomly places these planned provinces. You can tell it the percentage you want as designed vs being left to the games randomizer. As SemiRandom reads the map file, if it finds a farmland province then it chooses a farmland file and inserts it there. When it writes out the modified version of the .map file there will be special provinces included.
Thats the basic of it (pun intended). Of course Ballbarian has added wonderful extensions. The @ sign allowing for a small list so something like the guards equipment or name can be randomly selected from a short group of logical choices. And recognition of special provinces such as island, lake, peninsula, volcano, cave, etc. And lately the ability to add pre-designed logical gods/scales for AIs
The effectiveness of the program depends on having many pre-designed provinces and god files. Enough that we dont seem to keep running into the same things over and over. I think we are getting close to that but Id love to see more people turn in some so we can get more variety.
Gandalf Parker
--
The Socializing Soloist, the Mad Mapper and the Minimalist Modder, the Lord of Chaos, the Prophet for Random, Experimenter of Extremes, He Who Will Not Normalize Standardize Specialize (or Finalize), He Who Public Domains All.
Last edited by Gandalf Parker; February 23rd, 2009 at 09:17 PM..
|
The Following User Says Thank You to Gandalf Parker For This Useful Post:
|
|

February 23rd, 2009, 11:13 PM
|
 |
Lieutenant General
|
|
Join Date: May 2008
Location: Utopia, Oregon
Posts: 2,676
Thanks: 83
Thanked 143 Times in 108 Posts
|
|
Re: Perking up the AI
I think what SemiRand really needs (borrowing from the rest of the winding journey of this thread), is a browser based designer. So for example, a page on the dom3minions server might have the same dialogues that are currently found in the downloadable exe, but the overt ease of creation and submission could likely spark a deluge of submissions - I am thinking that many people don't want to bother with it all for 1-2 provinces, but if all of those 1-2 province people were cajoled into submitting through the webservice, it would hugely magnify the number of available provinces.
|

February 24th, 2009, 07:26 AM
|
 |
General
|
|
Join Date: Feb 2007
Location: R'lyeh
Posts: 3,861
Thanks: 144
Thanked 403 Times in 176 Posts
|
|
Re: Perking up the AI
The main problem that I have with web services is designing forms. I hate design work.  I haven't yet found a good way to be able to just code and have forms for user interaction generated automatically, without using an overblown framework that tries to abstract the whole thing with MVC, forcing you to jam your logic into their structure and using their database abstraction instead of giving direct access to these kinds of things. I have in mind to get a web version of catgod, maybe I'll find something for it.
|

February 24th, 2009, 08:22 AM
|
Second Lieutenant
|
|
Join Date: May 2006
Posts: 465
Thanks: 10
Thanked 16 Times in 14 Posts
|
|
Re: Perking up the AI
JM: (OT: Thanks for switching your pic. I love that lolcat.)
Piggy-backing on your idea, if we had such a framework (and that shouldn't take much; I'll look into it) we could set up a 'pay-to-play' service where someone to use a MP server for a game had to contribute a province to 'the file'.
My OOP class was very big on knowing how to format text correctly, so I'm fairly certain I could write a Java app that could take this information and format it for SemiRandom.
|

February 24th, 2009, 11:44 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Perking up the AI
Im not so much an old programmer as I am an old internet admin. I was part of the early protocol discussions. So its not the programs, or what they are written in, which concerns me.
We can have a ton of apps. But I think that we should try to do is come to agreements on formats. The DomMap project developed some agreements on how .maps should be annotated. Some of that was carried over to the SemiRandom project. And some of the future developments for SemiRandom are most likely to use Edi's spreadsheet format as a database.
If all of the apps use an agreed on format for the province adds, god builds, sprites, etc then we can share libraries. And use data files which use Edi's spreadsheet, or at least an export from it, so that the apps stay current easier.
We might want to start an RFC thread on it. Actually the format of the province and god adds might be reaching a limit. The "appropriate" tags might want to be shifted to the first line of the file rather than the file name but thats something Ballbarian would have to agree to (but I could automate the file changes).
Gandalf Parker
--
The Socializing Soloist, the Mad Mapper and the Minimalist Modder, the Lord of Chaos, the Prophet for Random, Experimenter of Extremes, He Who Will Not Normalize Standardize Specialize (or Finalize), He Who Public Domains All.
|

February 24th, 2009, 06:50 PM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Perking up the AI
Well Ive put in a fairly full day.
I know I dont finish many of the other projects but if no one shows an interest most of them just sit in the "who cares anyway" list.
But the server stuff I do better with. I have now added a new game type for SemiRandom games.
http://www.dom3minions.com/HostedGames.htm
Gandalf Parker
--
The Socializing Soloist, the Mad Mapper and the Minimalist Modder, the Lord of Chaos, the Prophet for Random, Experimenter of Extremes, He Who Will Not Normalize Standardize Specialize (or Finalize), He Who Public Domains All.
|
The Following User Says Thank You to Gandalf Parker For This Useful Post:
|
|

February 25th, 2009, 12:38 AM
|
Corporal
|
|
Join Date: Mar 2003
Location: Australia
Posts: 109
Thanks: 2
Thanked 20 Times in 11 Posts
|
|
Re: Perking up the AI
Quote:
Originally Posted by Ballbarian
Can anyone recommend the direction of least resistance for an old windows user who started programming in basic on an TRS80 back in the early 80's and now is stuck in VB6 for his GUI needs? Don't get me wrong, I love VB as it is much more powerful than it gets credit for and allows me to generate fairly complex solutions quickly and painlessly for work. I just wish I could compile my work as a functional web page or something along those lines. Guess I should take the time to do some more research. Anybody familiar with VB6's web programming features?
|
Man, you're kidding! That's exactly how I started. The old TRS80. Progressed from basic to machine language (or whatever it was called). Ever since Object Oriented Programming came out I've had a difficult time working with classes and thinking in a non-linear way.
I split away from the MicroSoft programming languages in the late 90's when the power of PHP blew ASP out of the water. Never dabbled much in VB, .NET, ASPX etc since then.
The Dom3Bak utility I wrote was in Python because I wanted to see the power and ease of it. I'd certainly recommend it as an easy way to program. I'm guessing Java is closest to VB and C++ but I never spent much time with that language. Most of my coding work is still PHP.
I'm guessing that if you are wanting to bring your VB code to the web you would need to construct the GUI in ASPX with .NET and then use your VB code to power it.
As far as adding to this discussion about bringing programs like SemiRandom to the web, the hardest aspect will be to build the maps through Dominions3 and distribute them. Needs a lot of grunt and then the distribution files will be large. It seems that the rest of the process is essentially manipulating and compiling text-based data - which would be the easier part to build.
There could even be randomising rules built into the config files to help mix things up a bit. Eg. Percentage chance for a certain sorcerer to be in the province or random number of troops between a designated min and max.
__________________
Want to auto back-up each turn?...Dom3Bak
|
The Following User Says Thank You to das123 For This Useful Post:
|
|

February 25th, 2009, 12:45 AM
|
 |
Shrapnel Fanatic
|
|
Join Date: Oct 2003
Location: Vacaville, CA, USA
Posts: 13,736
Thanks: 341
Thanked 479 Times in 326 Posts
|
|
Re: Perking up the AI
In a way, there is. The @ sign in a SemiRandom file designates a random selection. So you could designate the number of troops to be an @ list with 10, 20, 40, 60 troops to select from.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is On
|
|
|
|
|