Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (540)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (603)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  nOOb going doing an AI to an computerized war boardgame, yeah sure..  (Read 2568 times)
0 Members and 1 Guest are viewing this topic.
Offline NewOnJava

Junior Devvie




1970 born Java game hobbyer.


« Posted 2007-05-21 12:34:10 »

Hei!

One picture speaks more than hundred words so here comes..
[edit]you can get the picture larger by right clicking it from your browser and selecting open picture..


at first i have to say that i have no education for computers,
still i can imagine and build an "simple" statemap with my brains, so i think i have an nice start on building this AI..

situtation-
map has 4 towns, towns are light green hexes containing rectangles, 3 of the towns are controlled by infantry and one town has two american armor adjacted..
map has several units of german and american (O) armor and (X) infantry on..
units are on war and armor is strong and infantry is a bit weaker, armor moves 5 and infantry moves 3..
this picture is just an small example of my possible game situtations, my plans have an scenarios of about 45x45 hexes sided maps with towns rivers forests seas hills, so this is just an simple example of my plan..

my question goes to those who have more years of experience on AIs than what i have, greatly happy to get even few tips from the people..

if units are on offence, is the AI what i need just an simple go to an "location" AI..
so if units in offence i should just "lock" few preplanned locations on my game map on random or in nonrandom order and then just put the units stubbournly try to move and fight on theyr way to these "locked" locations..
and if the units are on defence i should just build an "eye pleasing" line of defence around "locations" with my units..

i have horrible english im just an (finnish) factory worker, but, would be very nice to have an small chat conserning about computer AIs, with someone who has already build an (small) AI to a game before..

thanks..

JariTapio / Helsinki
www.EuroJari.net
JariTapio@EuroJari.net
Offline JAW

Senior Devvie


Medals: 2



« Reply #1 - Posted 2007-05-25 13:03:00 »

I think this will be round based, which allows a good analysis of the situation. Players dont mind to wait 5 seconds for the AI to make its move on a roundbased game.

For defence find strategic useful position, place short range units in front and long range units in the back. Place artillery so that they can support as many sourrunding units as possible. Maybe have some mobile troops to reinforce areas under heavy attack or make a flanking move on enemy artillery or logistics.
Most analysis is realtively easy. E.g. enemy artillery is a good target:
- if its close to own units
- if there are not many enemies around to defend it

The harder part is making decisions among all possible options.

For attack scenarios, define the targets as target sectors. Evaluate the current situation and assign values to all fields. Assign "costs" to the fields. When a field can be attacked by an enemy, add a cost. For each enemy and artillery that can attack a field, add costs. So fields are more "expensive" when there are more enemies that can attack there. Reduce costs for usefull terrain. Reduce costs for weak enemy units, etc. So your units should use the fields which cost less, so they wont be attacked much, attack only weak enemies, use terrain advantages, etc. Reduce costs for fields next to own units that already moved, so your units are likely to stay together.

This are just ideas for starters. In the end you have to make it uo yourself, but I suppose
1) Evaluate each field with good and bad factors, evaluate which enemies to attack and which to avoid, weak and strong defended areas, etc. This is all easy to calculate. This will give you a so called "influence map". Influence Map means that you have a value for each field. A high value can be good, a low value can be bad, or the other way.
A multi layered influence map has several values for each field. For example one value for own strength, one for enemy strength, one for artillery support, one for terrain, etc. The value of a field is the weighted sum of all single values. So bad terrain can be outweight by good artillery support and many friendly units around, while the enemy is only weakly present. You can assign different weights to the values based on your aim. Defensive play may put higher weight on artillery support and terrain while offense values own units in the area higher.
Google for "influence map" youll probably find more.

2) Choose best options based on the evaluation. Google for goal oriented behaviour or decision making. Visit the Gamasutra and Gamedev website and read articles. If your strongly interested in AI, consider the books "AI game programming Wisdom"

-JAW
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Mr.CodeIt (24 views)
2014-12-23 03:34:11

rwatson462 (53 views)
2014-12-15 09:26:44

Mr.CodeIt (45 views)
2014-12-14 19:50:38

BurntPizza (85 views)
2014-12-09 22:41:13

BurntPizza (110 views)
2014-12-08 04:46:31

JscottyBieshaar (79 views)
2014-12-05 12:39:02

SHC (89 views)
2014-12-03 16:27:13

CopyableCougar4 (97 views)
2014-11-29 21:32:03

toopeicgaming1999 (155 views)
2014-11-26 15:22:04

toopeicgaming1999 (152 views)
2014-11-26 15:20:36
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!