Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Field Marshal: New game project  (Read 1175 times)

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Field Marshal: New game project
« on: April 19, 2011, 04:38:17 pm »

So, I have some ideas for a learning AI that I'd like to mess around with. And it occurred to me that a basic strategy game would be a perfect test of planning skills for an AI, both short and long term.

So I've decided to make one and then work on getting an AI that can learn to play it with a minimum of hardcoded knowledge. Ideally, nothing beyond the basic 'senses' to allow it to interact with the game. But we'll see how that goes.

In any case, I'm also using this as an opportunity to learn C#. I'm familiar with C++, C, and Perl and I did some visual basic back in the day, so I figure it'll be reasonably quick to pick up.

The main reason for this thread is to give me a place to chronicle my work and hopefully give me impetus to keep plugging away at it. I'll also happily take programming suggestions and help.

First steps are to get a basic UI in place. I'll need to have a scrollable map area as well as a way to show your units and interact with them.

For ease of programming and game design I'm going to go with a basic grid. Hex would be more flexible, but I'm going to start small.


Checklist:
  • Basic interface layout
  • Scrollable map
  • map interaction
  • Unit list
  • Unit placement
  • Unit movement
  • Unit combat
  • AI memory
  • AI planning capacity
  • AI game interface
  • AI tests and training

More items will be added as I run across them and as I feel I need to break up existing items. But that's a start.

Units will be very simple for now. Each unit will have 100 men in it, with reduced unit counts also reducing the strength of the unit.
3 unit types: Swordsmen, Pikemen, Archers. Basically RPS, with Swordmen beating Archers but losing to Pikemen, Pikemen beating Swordsmen but losing to Archers, and so on.
Units will have 2 movement per round. Attacking takes 1 movement, so units can either attack twice, move and attack, attack and move, or move twice.
Archers will have a range of 6 spaces.
Archers will lose to pretty much anyone in hand-hand combat.

I'll update this post as things progress.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

alfie275

  • Bay Watcher
    • View Profile
Re: Field Marshal: New game project
« Reply #1 on: April 19, 2011, 11:06:59 pm »

Sugestion: Post updates in the form of humorous Aperture Science style reports, for lols.
Logged
I do LP of videogames!
See here:
http://www.youtube.com/user/MrAlfie275

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: Field Marshal: New game project
« Reply #2 on: April 20, 2011, 01:41:56 pm »

Hmm. Maybe when I get to the actual AI part.

General progress: Basic stuff, but progress nonetheless. I now have a basic form set up and can track the mouse position and clicks. However, the panel where my map is going to be gives me an offset on the position. What should be 0,0 gives me -124,-151. Very odd. So my goal for this afternoon is to figure that out. I could hardcode the offset into my calculations, but that seems stupid.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

MirrorIrorriM

  • Bay Watcher
    • View Profile
Re: Field Marshal: New game project
« Reply #3 on: April 25, 2011, 07:56:48 pm »

One interesting technique to try for an AI with no hardcoded knowledge is a trial and error system.  Have the AI face off against an opponent with a certain set of units and record how successful it was.  Document this knowledge in an .ini file or something of that sort for future reference.  The ai could then build knowledge, like look at how pikes fared against swords at different distances and average the success rates to get a general idea of how good a particular set up is.  Throw some random moves in there to keep it interesting and to help the ai keep documenting various tactics.
Logged

Mephansteras

  • Bay Watcher
  • Forger of Civilizations
    • View Profile
Re: Field Marshal: New game project
« Reply #4 on: April 25, 2011, 09:32:09 pm »

That's basically what I'll be doing, except that I'll be keeping an entire memory of events in a generalized form. I'm also planning on having it be able to watch what I do and learn from my motions.
Logged
Civilization Forge Mod v2.80: Adding in new races, equipment, animals, plants, metals, etc. Now with Alchemy and Libraries! Variety to spice up DF! (For DF 0.34.10)
Come play Mafia with us!
"Let us maintain our chill composure." - Toady One

Aramco

  • Bay Watcher
    • View Profile
Re: Field Marshal: New game project
« Reply #5 on: April 26, 2011, 09:43:37 pm »

learning AI

NO! IT WILL TAKE OVER THE INTERNET!
Logged
Or maybe there's a god who's just completely insane and sends you to Detroit, Michigan in a new body if you ever utter the name "Pat Sajak".