Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411710 Posts in 69402 Topics- by 58456 Members - Latest Member: FezzikTheGiant

May 20, 2024, 09:15:23 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignSimple, tactical game for AI writers
Pages: [1]
Print
Author Topic: Simple, tactical game for AI writers  (Read 1352 times)
pimmhogeling
Level 0
**


View Profile WWW
« on: October 13, 2011, 04:18:32 AM »

Hey guys,

I teach kids how to program by having them write AI for a board game. Writing AI is cool, because it can be kept at a not-so-technical level and still feel rewarding.

The rules to the game are on Google Docs.

There are two things I don't like about this game. Those things are described in the document. All your thoughts are belong on Docs (or in this topic).

Thanks, you're awesome!
Logged
Liosan
Level 2
**


View Profile
« Reply #1 on: October 13, 2011, 04:58:16 AM »

It would help me personally, if the triangles were instead simple flag icons - because I keep thinking "which shape are we supposed to capture again?" Smiley

One solution to make the game more interesting is asymmetric maps or win conditions:
- you could make one corner have more spawn points and the other more control point (or a shorter path to some of them).
- or maybe put the only control point in one player's corner and extra spawn points in the other's - then the defending side has to hold out for a given number of turns. (this doesn't actually solve your "only two valid tactics" problem - on the contrary, it takes even further Smiley)
- or split one player's starting army in two, have the opposing player start in the middle, and place the control points in two clusters between the three unit groups.
- or give the two players different control fields to capture - red has to capture a specific field located near blue's starting position and vice versa.
Of course, these ideas could be difficult to balance, or lead to uninteresting gameplay... I'm not sure, I don't really "feel" the game Smiley So I'm just tossing them at you.

Another idea... I have a feeling that the rock-paper-scissors mechanic you tried to implement isn't really working out as well as you planned; I think the players just grab any circle and use it no matter what type of unit it produces, or try to grab a square. Maybe this mechanic should have more emphasis - for instance add a rule allowing only one type of units on any given field (and obviously dump squares). Add a little tweaking to the numbers - maybe increase the bonus/penalty against opponent types... If I were to implement, I would do it so that only swordsmen can recruit swordsmen, only lancers can recruit lancers etc. If you loose all your units of one type... well Roll Eyes

What do you think? Smiley

Liosan
Logged

pimmhogeling
Level 0
**


View Profile WWW
« Reply #2 on: October 14, 2011, 08:01:55 AM »

Thanks, Liosan. Love the ideas.

It would help me personally, if the triangles were instead simple flag icons - because I keep thinking "which shape are we supposed to capture again?" Smiley
Agrees. I would even more so prefer solar power plants you have to capture because four of them together have enough power to launch the spaceship. But yeah… triangles must go.
One solution to make the game more interesting is asymmetric maps or win conditions:
- you could make one corner have more spawn points and the other more control point (or a shorter path to some of them).
- or maybe put the only control point in one player's corner and extra spawn points in the other's - then the defending side has to hold out for a given number of turns. (this doesn't actually solve your "only two valid tactics" problem - on the contrary, it takes even further Smiley)
Love the idea of asymmetric maps. It would make it harder to write AI, though. Especially opening books. But a nice path to check out.
- or split one player's starting army in two, have the opposing player start in the middle, and place the control points in two clusters between the three unit groups.
Splitting the starting armies sounds fun.
- or give the two players different control fields to capture - red has to capture a specific field located near blue's starting position and vice versa.
Cool idea!
Of course, these ideas could be difficult to balance, or lead to uninteresting gameplay... I'm not sure, I don't really "feel" the game Smiley So I'm just tossing them at you.
What could I do for you to "feel" the game, then?
Another idea... I have a feeling that the rock-paper-scissors mechanic you tried to implement isn't really working out as well as you planned; I think the players just grab any circle and use it no matter what type of unit it produces, or try to grab a square. Maybe this mechanic should have more emphasis - for instance add a rule allowing only one type of units on any given field (and obviously dump squares). Add a little tweaking to the numbers - maybe increase the bonus/penalty against opponent types... If I were to implement, I would do it so that only swordsmen can recruit swordsmen, only lancers can recruit lancers etc. If you loose all your units of one type... well Roll Eyes
The cool thing about the rock-paper-scissors mechanic, is that an AI writer can ignore it at first (creating a "stupid", but nonetheless functional AI) and take advantage of the mechanic later.
This sounds interesting, though: a player can take a swordsman to a circle, and turn that circle into a swordsman-producing circle. Take an axeman there, and it'll produce axemen.

Thanks for the tosses, bro!
Logged
randomnine
Level 1
*


View Profile WWW
« Reply #3 on: October 15, 2011, 05:43:46 AM »

Here's how I'd make it more intuitive.

Axemen -> Rocket Troopers
Lancemen -> Tanks
Swordsmen -> Infantry

Units of different kinds can't stack, as stacking both makes things more complex to display (so less intuitive) and reduces tactical complexity by blurring the lines and allowing general-purpose forces.

- Squares and circles all become Towns. If a unit starts and finishes a turn on a town without splitting off units, it gains 1 strength up to the maximum.

- Triangles become Flags or Towers.

Mechanically, here's what I'd change:

Armies have a maximum strength of 5. You start with one army of each kind, of strength 3, in one corner of the board at (0,0), (2,0) and (0,2). (If the maximum/starting strength is too high, then splitting off single units to capture stuff becomes too safe.)

Each turn, players may move all or part of every single army they control. (Moving one at a time makes the game less interesting by preventing coordinated actions, while also making AI writing more complex.)

If an army moves into a friendly army's location, they swap places.

It takes five turns to capture a flag/tower. (This is so that, if someone rushes to capture flags too quickly, the opponent can take a few turns to reinforce/get into position and then guarantee winning the fight.) Once captured, a flag/tower remains yours even if you move all units off it.

The flags/towers should be spread out, not concentrated in the centre. I'd have three along the diagonal of the board (at 1,1; 3,3; 5,5). Spreading them out and making it take a while to capture something makes it harder to rush in for the win (your 'puma') and harder to have strong armies hovering around all of them at once.

Win condition: Every turn, each army occupying a flag/tower that you've captured gives you 1 point. The winner is the first player to, say, 20 points.

Combat mechanics: Defending units do damage before attacking units. Armies do 3 damage to the kind they're strong against, 2 damage to their own kind, and 1 damage to the kind they're weak against. Defending units take no damage if they kill the attacking unit. If an attacking unit destroys a defending unit, it moves to the defending unit's old location.

(Optionally: A unit can only defend against one attack per turn. If an army of 5 tanks is attacked by rocket troopers and then by infantry on the same turn, it does 1 damage to the rocket troopers and 0 to the infantry, while taking 4 damage itself.)

I'd also reduce the number of towns substantially to 4 or even 2 on each side. (Not 3. The number of towns should force you to unbalance your army.)

With this set of mechanics, I think you have to react to the unit types your opponent is making more of, rush to capture points ideally just before your opponent does, and play tactically to win combat. I'd have to prototype to figure out if it's a good direction, but it feels a bit easier to get a handle on and I think it definitely has interesting strategic problems in. I mean... it's really easy to see what's going on here, right? But... what's a good opening move?

Logged

pimmhogeling
Level 0
**


View Profile WWW
« Reply #4 on: October 15, 2011, 02:01:49 PM »

Axemen -> Rocket Troopers
Lancemen -> Tanks
Swordsmen -> Infantry
Love it.
Units of different kinds can't stack, as stacking both makes things more complex to display (so less intuitive) and reduces tactical complexity by blurring the lines and allowing general-purpose forces.
Love it as well.

I'll make sure the API that the AI writers will use has both kind-blindness as well as kind-awareness. One could easily select the closest army to a certain field, or select the most appropriate army to fight a certain rivalling army.

That way, n00bs can choose to ignore the mechanic altogether and create a stupid-but-functional AI.
- Squares and circles all become Towns. If a unit starts and finishes a turn on a town without splitting off units, it gains 1 strength up to the maximum.

- Triangles become Flags or Towers.
Love.
Each turn, players may move all or part of every single army they control. (Moving one at a time makes the game less interesting by preventing coordinated actions, while also making AI writing more complex.)
I'm not sure if I fully understand what you mean here. Having players move multiple armies per ply would definitely make the AI more complex.
If an army moves into a friendly army's location, they swap places.
Great idea. This way, there is no need for pathfinding, although it would still be very useful. "No need but very useful" is great: n00bs can leave it out at first, and add it later.
The flags/towers should be spread out, not concentrated in the centre. I'd have three along the diagonal of the board (at 1,1; 3,3; 5,5). Spreading them out and making it take a while to capture something makes it harder to rush in for the win (your 'puma') and harder to have strong armies hovering around all of them at once.
Yes!
(Optionally: A unit can only defend against one attack per turn. If an army of 5 tanks is attacked by rocket troopers and then by infantry on the same turn, it does 1 damage to the rocket troopers and 0 to the infantry, while taking 4 damage itself.)
Would add some depth, but would also add complexity. Not sure…
With this set of mechanics, I think you have to react to the unit types your opponent is making more of, rush to capture points ideally just before your opponent does, and play tactically to win combat. I'd have to prototype to figure out if it's a good direction, but it feels a bit easier to get a handle on and I think it definitely has interesting strategic problems in.
Love your tosses, too.

I'll probably prototype the changed game in a week. You'll see a mention on your Twitter feed when I'm done.
Logged
zovirl
Level 1
*


Mark Ivey


View Profile WWW
« Reply #5 on: October 16, 2011, 05:20:05 PM »

Thinking of other variations of capture the flag...maybe one will spark an idea for you:
  • Most FPS capture the flag modes involve stealing a flag from the opposing base and returning it to your base, leading to lots of dynamic movement and repeated trips across the map.
  • Back when I played paintball, we'd put the (solitary) flag in the middle of a clearing. Both teams would normally end up taking up positions behind trees on opposite sides of the clearing. The result was that most of the game centered around how to get the flag out of the clearing without getting shot. Flanking efforts and distractions usually won the game.
  • We also played a different setup where you have to take the flag to the *opposite* base (i.e. through enemy lines). This lead to fewer pitched battles and a lot more movement in general. A common tactic was to have a fast runner get the flag and then retreat (away from the objective) in order to move the flag around to the side of the field before going back towards the opposing base.
  • A lot of FPS games require that you hold an objective for 30 seconds before it counts as "captured." This can make things more dynamic than just "first one there wins."
  • I assume players can "steal" or "re-capture" a flag that was previously captured?
  • Myth 2 (an old RTS) had a mode where you had to be the uncontested holder to capture (meaning no enemy units nearby). Sometimes you would want to disengage while reinforcements moved up but the "uncontested" rule meant you couldn't retreat or the other side would capture.

Also, way to go randomnine busting out the art! Having recognizable pieces makes the rules so much easier to remember. Out of curiosity, where'd that art come from? Did you just make it?
Logged

Alaskan Runway, a side-scrolling flight sim I'm working on.
Forest, a walking meditation game. (behind the scenes)
www.zovirl.com
randomnine
Level 1
*


View Profile WWW
« Reply #6 on: October 18, 2011, 01:10:22 AM »

Quote
I'll probably prototype the changed game in a week. You'll see a mention on your Twitter feed when I'm done.

Cool Smiley

Also, way to go randomnine busting out the art! Having recognizable pieces makes the rules so much easier to remember. Out of curiosity, where'd that art come from? Did you just make it?

Yeah, though the infantry sprite is from a game I did about 7 years ago, heh.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic