Jump to content


Photo

Computer Ai


  • Please log in to reply
56 replies to this topic

#1 Archaon376

Archaon376

    Sergeant

  • Forum Members
  • PipPipPip
  • 39 posts

Posted 03 June 2005 - 07:22 PM

Hey guys I was just wondering if there will ever be computer AI implemented into this game so we can actually play against someone other than ourselves (:P) if there's no one online.

And you could take the extra step and add team/co-op features :P

#2 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 03 June 2005 - 09:20 PM

It would be nice. I think Serge is working on making a simple AI feature.

Edited by Kratos, 03 June 2005 - 09:20 PM.


#3 Exo2000

Exo2000

    Colonel

  • Moderators
  • PipPipPipPipPip
  • 1,009 posts

Posted 04 June 2005 - 03:15 AM

Problem is arming the soldiers (alternately, slap the AI with premade squads) and then, of course, making them "adapt" to different maps, use weapons and custom weapons effectively, use cover, etc.

Ideally the basic-est AI will be able to;
Find cover for it's soldiers
Reload the soldier's weapons
Know when to use grenades, and when (so it doesn't waste a super nade on one lone man, or a pathetic grenade on a a large group of armoured troops)
Know when to use Snap, Aimed and Auto (so as not to waste Auto on a target far away, or vice versa)
Be able to navigate a randomised map without difficulties (basic maps have their own pathnodes set up - most customs don't)
Be able to choose appropriate equipment and troops based on the ones you're using, so as not to be unbalanced (toggleable, or you can equip it yourself)

Edited by Exo2000, 04 June 2005 - 03:17 AM.

Posted Image

#4 hsbckb

hsbckb

    Sergeant

  • Forum Members
  • PipPipPip
  • 13 posts

Posted 06 June 2005 - 07:02 PM

Can we get help from the team of Pocket UFO? AI is implemented in the game.

#5 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 06 June 2005 - 07:09 PM

Can we get help from the team of Pocket UFO? AI is implemented in the game.

<{POST_SNAPBACK}>

Most definately NOT. UFO2000 is a free game made by fans of the original Xcom game. And the makers of Xcom is the makers who made the Pocket UFO. Most of Ufo2000 is made from scratch and is trying to seek independence from any type of copyright laws. This game is not going to be any type of comercial game whatsoever, and never will be. I suggest that you read more on the original ufo2000 site on its about information at http://ufo2000.sourceforge.net

Edited by Kratos, 06 June 2005 - 07:11 PM.


#6 Doom Warrior

Doom Warrior

    Squaddie

  • Forum Members
  • PipPip
  • 2 posts

Posted 07 June 2005 - 02:39 AM

And the makers of Xcom is the makers who made the Pocket UFO.


no, the developers of PocketUFO are an independent Russian team.

#7 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 07 June 2005 - 10:53 AM

And the makers of Xcom is the makers who made the Pocket UFO.


no, the developers of PocketUFO are an independent Russian team.

<{POST_SNAPBACK}>

I suggest to PM Serge about this. He is the main developer. Talk to him...nobody else has permission to accept newcomers but him.

#8 DakeDesu

DakeDesu

    Sergeant

  • Forum Members
  • PipPipPip
  • 20 posts

Posted 27 June 2005 - 08:14 PM

I am going through a bunch of strategy guides so that I don't suck at ufo2000, however I need something to practice against... well, I shouldn't have thought I'd be the first to come up with the idea of ufo2000 single player AI.

My idea:
One: use evolution based AI. At certain points in development, or rather when features are tweaked or added, the AI... lets call him Al, Al will go through every single possible strategy to win. Anything from one player with only a single grenade to a team of fifteen players all wacked out on scooby snacks. It would play each of these combinations on every map and custom weaponset the AI maintianers have access to. Similar tactics would be combined into one, so if City and Atlantis have the same strategy, simply have the strategy say, "works in both City and Atlantis" rather than city => strategy 8, atlantis => strategy 8.

Two: Only Certain maps and weaponsets would have AI available for them.

Three: Al would rarely go for education--he'd be ran and then stored as a library. The library is what would be distrobuted to binary versions and some source distrobutions.

Four: If it is allowed, I'd prefer than Al would be written in Lisp. I think Lisp would be more appropiate for Al than Lua. I think we can embed Clisp, but make it an optional feature--some people may not want an AI.

Five: I am reading some books on psychology with computer AI, and I am checking some field guides I also am trying to brush up on my Lisp. So, I wouldn't mind being the maintainer of this section of code.

Six: THERE IS NOOOOOOOO IDEA SIX

Seven: it would be tested via having the AI go online--people would challenge my AI, I would look in the log files--and eventually program Al to look through his own log files to improve. The log file checking would be done regardless of victoly, as even in victoly there are ways to improve. The log would contain each move Al saw (IE: sent over the network for him to view) as well as things Al did himself.

Eight: A possible problem. I need some way to cut the branches on the evolution tree. I will be putting in unit and equipment stats as well as a few base strategies, but there are bound to be some failled strategies out there. Like load them all up with rocket launchers and incinerary rocktes and let them go loose. However somethhing like a rocket launcher and another weapon might work in moderation. I guess what I am saying is--every unit could be used intactic, just not in excess.

There would also be other strategies that would never work... though evolved forms of them might.

Nine: policies on game bots? Are bots allowed, or is that frowned upon? Because Al would require competition to work out.

Anyways, you say to pm Serge about it? Well I will wait until I have read a few more strategies and field guides, and maybe get a little further in my AI/psychology books, and refresh a little more on my Lisp.

Once I get a prototype of this working, and from it I learn how to do better on the official server, I'll PM Serge. However, is it okay to mess around with the beta source as long as I don't try to take claim to it as my own? I mean If I distrobuted it, it would be © ™ Serge for ufo2000, w/ Lisp AI done by DakeDesu, or something similar. The purpose of the modification of the Beta code would be to take the latest features, and allow the AI to use them (and I seriously doubt that the AI would be in stable for some time).

Anyways, I hope I can help.
--------
I came here to mod.

#9 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 27 June 2005 - 10:22 PM

However, is it okay to mess around with the beta source as long as I don't try to take claim to it as my own? I mean If I distrobuted it, it would be ™ Serge for ufo2000, w/ Lisp AI done by DakeDesu, or something similar.

Let me explain what UFO2000 is. UFO2000 is freeware that was created by fans of the original xcom game. This game was made from scratch from the developers to make it avoid copyright laws. Selling is illegal, but distributing it Free is not. The game that requires it to run, xcom 1\xcom 2 is not anybody's to claim, it was made by micropose. Distributing xcom 1\xcom 2 in anyway is illegal. Yes you can tweak the beta code however you like (I think). NO SELLING THIS GAME. I do not think you can claim UFO2000 (ask serge about that).

Edited by Kratos, 27 June 2005 - 10:25 PM.


#10 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 28 June 2005 - 11:16 AM

License and the things about what is alloowed and what is not, are discussed here: http://www.xcomufo.c...?showtopic=7852

We need some topic to discuss AI, so I pinned this one :)
ufo2000 development team
http://ufo2000.sourceforge.net

#11 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 28 June 2005 - 11:30 AM

About AI.

Do you have any experience with programming AI using lisp? If not, I do not encourage any such experiments :) There are some reasons - poor support for lisp in windows, it is quite an uncommon language and it is quite different from the other programming languages, I doubt anyone but you would like to use it for programming here.

Also I do not think that a very advanced/complicated AI would be ever needed. In my opinion it should be reliable and maintainable. The main purpose for it woul be thaining newbees. And also for a singleplayer, game some race based modifiers or behaviour can be applied to add more fun (like making some aliens coward, some - stupid, ...). Just sheer efficiency is not something everyone needs and it is not always fun.

Anyway, you are free to make any changes to the sources or make a completely new game based on them (if you do not violate GPL license conditions of course). If you prove that your approach gives really good results, there will be no objections about including your AI in the official sources for sure :)
ufo2000 development team
http://ufo2000.sourceforge.net

#12 Exo2000

Exo2000

    Colonel

  • Moderators
  • PipPipPipPipPip
  • 1,009 posts

Posted 28 June 2005 - 11:31 AM

AI Programming. Fun! (not!)
Posted Image

#13 DakeDesu

DakeDesu

    Sergeant

  • Forum Members
  • PipPipPip
  • 20 posts

Posted 28 June 2005 - 07:33 PM

Well, I started to take Lisp seriously as a langauge back when Bishop_pass was still attending the GameDev.net forums (just a note: I tend to tick people off at GameDev.net... mostly inadvertantly via doing stupid things). I have messed around with it. It would be perfect for the evolution based strategy...

But I guess, yeah your right, evolution based AI would be poor for training newbies, I just went overboard with my ideas.

Though it would be interesting to see what an evolution based AI would come up with for tactics and strategy... I will continue work on using CLisp, but I will only be using it as a seperate client. So, no, I won't be doing the newbie trainer. Instead, if it is okay with you, Serge, I will be experimenting with AI for tournament based purposes.

How I'd set it up (which from my experiments in CLisp should be possible):
1) List of overall limits on stats.
-- for 10k, 15k, 20k, 50k matchs
2) Come up with a list of opening moves
-- Need to read more on various field manuals, and strategy guides. I will be going over these forums, but if others can come up with other sources :)
3) Come up with a list of stats for units.
-- This will require a list of Lambdas that will be fun.
4) List of weapons and weapons stats
-- For the AI to decide which to choose per unit.
-- The fun part will be deciding how many weapons the unit will have.
5) Lists of possible moves based upon
-- This list will be auto generated, then reviewed.

Then coming up with some basic scenerios and testing a few combinations.

For this, I could test everything in a Lisp program, but I wouldn't mind testing this on real humans--rather than testing every single strategy on every single counter strategy. So I may still need to create a modified ufo2000

I will have to think of what I am doing, and come up with a prototype.

So in conclusion I've decided to not make a newbie trainer AI, but a tournament AI... if that is okay with you Serge?
--------
I came here to mod.

#14 Twilight Owl

Twilight Owl

    Project Member: UFO 2000

  • Forum Members
  • PipPipPip
  • 98 posts

Posted 29 June 2005 - 02:26 PM

BTW, did you hear about this Lisp-integration library: http://www.intelib.org ?
Sorry for my English :)

Posted Image
UFO2000 team
[programmer, map maker]

#15 DakeDesu

DakeDesu

    Sergeant

  • Forum Members
  • PipPipPip
  • 20 posts

Posted 29 June 2005 - 09:43 PM

BTW, did you hear about this Lisp-integration library: http://www.intelib.org ?

<{POST_SNAPBACK}>


No, I haven't, though it looks fairlly close to what I want to do. I will research more into this.

Thanks, I was thinking I would have to implement the entire hyperspec... (or steal a good portion of code from Common Lisp(which wouldn't be nice))

I have to prioritise now (I want to get an entry into GameDev.net's 4E4 Contest).
--------
I came here to mod.

#16 loxotron

loxotron

    Sergeant

  • Forum Members
  • PipPipPip
  • 18 posts

Posted 06 September 2005 - 12:36 PM

so what do serge now think about ai
can it will be added? :)
the last messege 29 june :))
I'm an big big LOL ..)

#17 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 06 September 2005 - 01:07 PM

so what do serge now think about ai

http://ufo2k.lxnt.in...view.php?id=222

can it will be added? :)

It can be added. The question is when it will be added. We did not hear any news from DakeDesu for a long time. And I definitely will not start working on AI myself at least until the version 0.8.x gets released. We just have enough more important tasks to solve.

the last messege 29 june :))

This thread is pinned, so don't worry :)
ufo2000 development team
http://ufo2000.sourceforge.net

#18 DakeDesu

DakeDesu

    Sergeant

  • Forum Members
  • PipPipPip
  • 20 posts

Posted 26 October 2005 - 06:10 AM

Hi, remember me? I was the person that said she would be making a tournament based AI for ufo2000.

I am still more or less in the planning stage, and most likely will be using that lisp link that I was given before.

Right now I am mostly playing around with various plans on the AI, The main goal being that no one strategy is hardcoded into Dayone (what I am calling the AI). There are a few ways to do this, and I am glad I have a machine set aside to do this, rather than force my main one to give up cycles for it.

I would make this a poll, but I want replies that put some thought into this, so here are some ideas I thought.

1) Have a list of moves, and string them together in an orderly manner. After about a few trillion times of Dayone playing this way, she should have a good idea what strings of moves give the best results. Of course this would be done with a sort of two dimensional thing, or a round robin of sorts. Where team 1 does _-all-_ the possible game attacks against team 2 which only does one, until team 1 has done all possible methods. At which point team 2 does the next possible string of attackes.

2) Steal from chess bots and have a large dictionary of openning moves, and base what is done based on the opening attacks

3) Like 1, but with point values attached. Though if you could help me on this, and teach me what is generally thought of as good and bad moves... I am not exactly a master with this yet.

4) Combine 1 and 2.

5) Combine 2 and 3

Number 1
Pros: Quick to program. No thought required to get results.
Cons: Insanely long to program. May produce idiotic AI

Number 2
Pros: Steals from Chess AI, so it must be proven
Cons: I am very limited in my ideas of known opening moves

Number 3:
Pros: Can make stylised AI. For example, if I want my AI to do as little structural damage, I would give less points to moves that harm scenery. If I wanted my AI to level anything in its path... well, you can see where I am going.
Cons: Arbitrary decisions will be made at this point.

Number 4:
Pros: Effect opening moves are easier to determine, effect moves after opening are easier to determine
Con: When does opening moves end?

Number 5:
Pros: Same as 3 and 4
Cons: Same as 3 and 4

-=-

Any advice would be nice. Right now, due to my lack of experimence I most likely will go with either 1 or 4.
--------
I came here to mod.

#19 nappes

nappes

    Sergeant

  • Forum Members
  • PipPipPip
  • 74 posts

Posted 26 October 2005 - 11:17 AM

The brute force approach of pruning and evaluating move trees only works in chess because, in chess the board is relatively small (only 64 squares) and the amount of legal moves in any given situation is relatively small as well. However, this kind of approach would not come into question for writing an AI for UFO2000, because UFO2000 is just so much more complex a game than chess. (Complex, in the mathematical sense, I must add, not necessarily in the sense of it being a more difficult game to play well, for humans, at least.)

Each terrain consists of thousands of different tiles in complex formations, and the effect of terrain on strategies cannot be overestimated. Knowing and understanding the battlefield better than your opponent does is almost always the key to victory. That combined with the fact that there is almost an infinite variety of maps you can play on means that there are no universally sound "opening moves" that could be stored in a library for an AI to memorize. A good move in one map is almost certainly completely useless in some another. In fact, it could be completely useless even on the exact same map against a different opponent, or the same opponent who just chose a different kind of squad and equipment. (Also it should be noted that the map can change even during one game due to destructed terrain) The sheer number of variables would completely overwhelm any AI based on the chess-like tree approach. Not to mention the effect of random chance, which can be a pretty deciding factor, and thus further blurs the lines between "good" and "bad" moves.

The only method of writing an even remotely working AI for UFO2000 I can envision is the purely heuristic one. Instead of focusing on making lists and trees of known moves, focus on the big picture. Give the AI some kind of general directives and "rules of thumb", and prioritize some of these over the others. Sometimes the AI would have to shift priorities between different directives based on the current situation. Generally, the prime directive would be keeping your soldiers alive and well, however, if it seems the enemy is winning (has more soldiers, has made several kills), the AI should become more willing to "take risks" and become more aggressive in favour of causing more damage over the priority of staying alive.

There could be a directive that says "always keep a distance between your units". (The reasoning behind this being, that it would be more difficult for the opponent to mow down several of your units at the same time using explosives or crossfire tactics. A group of soldiers discovered together usually dies together.) However, some situations might call for the AI having to override this directive. There could be another directive that says "always keep your soldiers hidden behind cover". Maybe the current terrain occupied by four soldiers is a large, open area with a concrete bunker in the middle and the soldiers are all out of smoke grenades. To make maximum use of the protective qualities of the terrain, the AI would have to go against the first directive of "keeping a distance" and decide that "seeking cover" is more important. Thus, the soldiers all go inside the safety of the bunker, even if this means they would have to be closer together than usual.

How does the AI know the bunker is "safer" than the open area around it? In addition of the decision making engine, there should be some part of the AI devoted to analysing and evaluating the terrain, tile by tile, giving "safety values" and perhaps some other properties to different spots in the terrain. So, when this routine observes a protective wall somewhere on the map, it would cast some "rays" around it, making the surrounding terrain "safer". A concentration of several wall tiles, would cast longer and more intense "safety rays". Maybe there could even be "negative safety", that is, Danger, that would be radiating from spots where the enemy has killed your squad members, and possibly from the enemies themselves. All of the AI soldiers would be generally inclined to move towards "safe" spots and avoid the "dangerous" ones. Actually, now that I think of it, this same radiation algorithm could be used to enforce the "keep a distance" paradigm, by making the AI's own soldiers radiate Danger.

Also, it might be an interesting idea to divide the AI into two parts, the other being the more strategic "overlord AI" making the big decisions, like "we must secure this area", "we must concentrate fire on that chryssalid" etc. The other part being the "tactical AI", controlling individual soldiers and trying to execute the "orders" passed down by the Overlord AI while still making some decisions related to the survival and well-being of the individual soldier.

Well,

I'm now out of ideas, and I realize this post winded up a bit long and unstructured, mostly just a flood of barely related thoughts but maybe some of it will help. I must stress again that whatever you do, don't try to emulate chess engines too much, because their approach, while it gives great results in chess, would produce a disaster in UFO2000. :p

#20 DakeDesu

DakeDesu

    Sergeant

  • Forum Members
  • PipPipPip
  • 20 posts

Posted 26 October 2005 - 07:32 PM

No, that wasn't quite rambling...

However, I never imagined what would work in the city would work in the desert. I was actually taking that into account--just I never mentioned it, thats all (in factI planned to run the AI generator on every mapset).

What your saying follows into what I was thinking with the point system. Just you've thought it out more, and it is more well formed--wheere when considering its move it bases it on point value. Again your idea was more well formed.

Thank you.

Any other comments =^.^=
--------
I came here to mod.

#21 CopyBass

CopyBass

    Captain

  • Forum Members
  • PipPipPipPip
  • 170 posts

Posted 26 October 2005 - 08:50 PM

I'd love to see a computer player send a soldier into a building in front of a guy with a chaingun and say "Check" :P
Posted ImagePosted Image

#22 KosiarZ

KosiarZ

    Squaddie

  • Forum Members
  • PipPip
  • 1 posts

Posted 31 October 2005 - 01:52 PM

Hm, imo a bot could go as alternative client, which would connect to lnxt.info and wait for opponents. The bot prog wouldn't depend on main ufo2k program. Go AI's run on Kiseido Go Server this way.

I see 2 variants:
a ) Bots could support the connection and game protocol by themselves, running as alternative clients. This way is not too good, yknow. Too much workage with sockets, the protocol itself and such, plus some more reasons why this way sucks ;P

b ) Someone (^^) could make a official ufo2k framework for bots, which would be recognized and marked by lnxt.info. It would handle all the formal connection stuff, and get the essential battle decisions and sightings from/to the bot program.

Generally, making such an open bot support could result even in some AI tournaments :P

Edited by KosiarZ, 31 October 2005 - 02:00 PM.


#23 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 02 November 2005 - 12:20 PM

Just a note. Writing bot for ufo2000 is not so easy as it might seem at first. The protocol itself is simple enough, but it is too low level and contains instructions for ufo2000 engine. Bot should have ufo2000 engine on board to be able to correctly decode the instructions coming from the remote host and see what's happening around. Also the commands it will generate should be correct and sensible, otherwise we will get the famous 'crc errors' and the game will become unusable. That's the problem of current multiplayer model, actually it is pear-to-pear and both clients have the engine running (different from the model where the engine is run entirely on the server).
ufo2000 development team
http://ufo2000.sourceforge.net

#24 Blood Angel

Blood Angel

    Captain

  • Forum Members
  • PipPipPipPip
  • 513 posts

Posted 07 November 2005 - 11:13 AM

Another thing to consider is the maps. Perhaps us peoples who make the maps will have to code in RMP paths for the AI to use. So the AI for a map is determined by the mapmaker.

#25 Serge

Serge

    Project Leader: UFO 2000

  • Xenocide Programming Department
  • 785 posts

Posted 07 November 2005 - 02:15 PM

Well, probably our AI should be clever enough and not need any RMP paths encoded :) Moreover, the terrain could be heavily damaged during the battle, so the AI should be able to correctly use holes in the walls and other passages.

It is not directly related to AI, but we also can have scriptable mission scenarios with predefined victory conditions. For full single player game, these mission scenario scripts can also have some triggers and provide some hints for AI.
ufo2000 development team
http://ufo2000.sourceforge.net

#26 Blood Angel

Blood Angel

    Captain

  • Forum Members
  • PipPipPipPip
  • 513 posts

Posted 08 November 2005 - 10:42 AM

What, you mean like "player 1 must destroy the fuel dump?"

#27 Archaon376

Archaon376

    Sergeant

  • Forum Members
  • PipPipPip
  • 39 posts

Posted 03 December 2005 - 10:45 AM

Wow I haven't been on this site in so long, I come back and I see one of my topics pinned. I feel special. :D

#28 nachtwolf

nachtwolf

    UFO2000 Staff: Leader

  • Moderators
  • PipPipPipPip
  • 310 posts

Posted 07 December 2005 - 12:37 PM

If you want my opinion, start with making simple civilian AI. Units that are curious, run, hide and get scared (morale).

Curious : actual civilians want to see, they'll just peek out the window looking and be very careful but still take some risks. (This will also help for the general soldier AI)

Run (Great map navigation)

Hide (Good for soldier AI, ambushes and cover)

Get scared cause it's funier to shoot around a civilian and have it screaming and running. (Survival instincts)

The ultimate start is Run in the map, once units can run around at random in the map we can start doing other stuff. Moreover we can start playing terror type games, having generic civilians added in the map in addition of the soldiers, which would be very interesting.
Posted Image

#29 Exo2000

Exo2000

    Colonel

  • Moderators
  • PipPipPipPipPip
  • 1,009 posts

Posted 12 December 2005 - 04:46 PM

If you want my opinion, start with making simple civilian AI. Units that are curious, run, hide and get scared (morale).

Curious : actual civilians want to see, they'll just peek out the window looking and be very careful but still take some risks. (This will also help for the general soldier AI)

Run  (Great map navigation)

Hide (Good for soldier AI, ambushes and cover)

Get scared cause it's funier to shoot around a civilian and have it screaming and running. (Survival instincts)

The ultimate start is Run in the map, once units can run around at random in the map we can start doing other stuff. Moreover we can start playing terror type games, having generic civilians added in the map in addition of the soldiers, which would be very interesting.

<{POST_SNAPBACK}>


We may be onto something here. :D

The Civilian-class AI should attempt to get the best view points (early sniper coding anyone?) that are as safe as possible - biggest view arc, most walls. If things look clear, move out into the open and look around.

If the civvy spots an alien, they should either freeze in terror, or start running like nonces. If a shot hits near them, they should get scared. If several hit near them, they should start running.

If they're not chased (fired at whilst running away) then find safe point (like view point, but to heck with view arcs - smaller is better here) with lots of objects and walls. If so, HIDE. If found, RUN. If not found after x turns, get inquisitive again, coz yer a dumb civvy.
Posted Image

#30 nachtwolf

nachtwolf

    UFO2000 Staff: Leader

  • Moderators
  • PipPipPipPip
  • 310 posts

Posted 12 December 2005 - 05:32 PM

If you want my opinion, start with making simple civilian AI. Units that are curious, run, hide and get scared (morale).

Curious : actual civilians want to see, they'll just peek out the window looking and be very careful but still take some risks. (This will also help for the general soldier AI)

Run  (Great map navigation)

Hide (Good for soldier AI, ambushes and cover)

Get scared cause it's funier to shoot around a civilian and have it screaming and running. (Survival instincts)

The ultimate start is Run in the map, once units can run around at random in the map we can start doing other stuff. Moreover we can start playing terror type games, having generic civilians added in the map in addition of the soldiers, which would be very interesting.

<{POST_SNAPBACK}>


We may be onto something here. :D

The Civilian-class AI should attempt to get the best view points (early sniper coding anyone?) that are as safe as possible - biggest view arc, most walls. If things look clear, move out into the open and look around.

If the civvy spots an alien, they should either freeze in terror, or start running like nonces. If a shot hits near them, they should get scared. If several hit near them, they should start running.

If they're not chased (fired at whilst running away) then find safe point (like view point, but to heck with view arcs - smaller is better here) with lots of objects and walls. If so, HIDE. If found, RUN. If not found after x turns, get inquisitive again, coz yer a dumb civvy.

<{POST_SNAPBACK}>


I would like to add, civvy tend to group up and stay together, because that's what people do when they are terrified.
Posted Image

#31 Llyr

Llyr

    Sergeant

  • Forum Members
  • PipPipPip
  • 83 posts

Posted 12 December 2005 - 06:59 PM

maybe one should start by deciding on some AI technique?

if you want just dumb bots for beginners i would suggest a simple finite state machine

as far as my knowledge goes, neural networks make nice AI too... you would just need some nerual network implementation (dunno if theres something like that in open source somewhere?) define all the sensors and variables the neural network will be allowed to use (that would be everything a player gets too... all stats on all the soldier units, map data and visibility data and stuff). i guess you would need a rather high number of neurons, because of the high complexity of the game tactics.
yeah, and than you would need the records (playbacks?) of some hundred games played by human players... data to feed the nn with ^^
it will then learn from players actions. the more data you feed it with, the better it gets. just let it steadily add data of all games it plays to its database, and it will never stop learning :)

i found some guide on neural networks some time ago... but it was about doing bots for first person shooters. i did some searching, but i wont find that damn page again. regretably i didn't bookmark it... and i don't seem able to find out how i got there first time...
in that tutorial the programmed a simple statemachine that then playes hours of games against itself (with turned of graphics and highly increased game speed) to provide learning data for the neural network. it looked surprisingly easy to do that... , since you don't need to understand how the network works, to use it and feed it with data :)

Edited by Llyr, 12 December 2005 - 07:30 PM.


#32 Prowler2885

Prowler2885

    Sergeant

  • Forum Members
  • PipPipPip
  • 31 posts

Posted 12 December 2005 - 08:18 PM

A good guide (and naming system of difficulty), follow the original's example of AI difficulties.

1 Novice
2 Beginner
3 Intermediate
ETC.

I mean, superhuman is freaking hard, especially in tactical combat mode. I mean, I had to do the "save every step" move in order to win one ufo fight on that difficulty. :sob:

#33 Kratos

Kratos

    UFO2000 Staff

  • Moderators
  • PipPipPipPipPip
  • 4,113 posts

Posted 12 December 2005 - 10:15 PM

I mean, superhuman is freaking hard, especially in tactical combat mode. I mean, I had to do the "save every step" move in order to win one ufo fight on that difficulty. :sob:

<{POST_SNAPBACK}>

I found it simply too easy. :)

The AI didn't increase, the armor did.

#34 Guest_Azrael_*

Guest_Azrael_*
  • Guests

Posted 13 December 2005 - 06:07 AM

And the amount of Aliens/UFOs, among others.

#35 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 14 December 2005 - 01:26 PM

A thought that occurs to me, as the Xenocide project is going to need an AI for controlling the battlefield, it would be nice if we could figure out some way to share our efforts and produce an AI that could be used for both Xenocide and UFO2K.
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#36 Guest_Azrael_*

Guest_Azrael_*
  • Guests

Posted 14 December 2005 - 01:30 PM

We now have different licences, I thought that sort of cooperation was no longer possible? (stupid legal nonsense)

#37 Blood Angel

Blood Angel

    Captain

  • Forum Members
  • PipPipPipPip
  • 513 posts

Posted 14 December 2005 - 02:11 PM

Not if we use simply the same style, not just simply c/p code. As long as we both retain our sanity and refrain from suing each other, we'll be fine.

#38 Guest_Azrael_*

Guest_Azrael_*
  • Guests

Posted 14 December 2005 - 02:50 PM

Eh, I don't think anyone from here will sue anyone, we're all having fun, but I just thought... oh well, I'll let the people who do worry about licences worry about this :D

#39 Sporb

Sporb

    UFO2000 Staff

  • Moderators
  • PipPipPipPip
  • 739 posts

Posted 14 December 2005 - 04:21 PM

no , u will contanimate us and steal our brains so that we have to spend an eternity as shambling zombies :P

#40 Blitzen

Blitzen

    Sergeant

  • Forum Members
  • PipPipPip
  • 80 posts

Posted 17 December 2005 - 01:51 AM

About the AI

Me and a buddy of mine have been disscussing the AI in X-com UFO. from varrious experiences that I have had with aliens, they seem to see only thier line of sight no global views. (I can't say for sure as I don't program and have never look at the code) What is cool about it is the aliens have priorities, they don't always do the same thing (sorta like the point values that were disscussed earlier). Also a good AI should be able to combat humas without global view. Make it so the AI will move through a map and when an enemy is sighted all the units converge on it and the surrounding area. If the AI sees someone at x spot, the AI will try to then surround and terminate said enemy. also the AI should move it's troops intelligently, no running down the middle of the street and no hidding behind gas barrels. I can't program, but I can do graphics...is there a way to export the picture files in x-com? If someone could tell me how that would be soo cool!
[MC]T_II_JudgmentDay
[MC]T_II_Judgment
[MC]TerminatorII
Blitzen

From:
Freelancer
Hyperiums

And Now UFO2000!

Detective: "He died from a drug overdose."
Officer: "Really? Which one?"
Detective: "Lead."

#41 hitmark

hitmark

    Sergeant

  • Forum Members
  • PipPipPip
  • 10 posts

Posted 06 March 2006 - 05:28 PM

hmm, lets give each soldier simple tasks/goals:

1. explore

this will be the basic function that triggers. pick a random spot that brings him towards a unmapped area, and/or one thats far from any current LOS area.

2. hunt&kill enemys

factors: distance to known enemy. number of soldiers that are closer. amount of ammo left?
each of those should affect the AI's choice of that target over the rest.
basicly, each target is given a priority based on those factors, and then the highest priority target is selected first.

3. survive!

factors: being shot at by a enemy. distance from other soldiers. availability of cover. damage taken. time since last being shot at?
again a slider. one that if it gets to high a retreat mode will trigger. the soldier should move towards available cover and closer to friendly soldiers. this should override 2 if its priority ever goes over any enemy targets.

so, if there is no known targets, 1 kicks in. if there is known targets, 2 kicks in. but at the same time, the targets are evaluated towards 3, so that if 3 ever gets a higher priority then any targets, 3 is what kicks in and the soldier "flee" to safety.

this should lead to a basic ai, that while dont use any specific tactics, can move about the map and react to enemy activity. atleast in theory. im no programmer, nor am i a AI scientist...

the devil is in the details, like how the AI evaluates terrain (whats good cover, whats bad cover?), and how the ai will move about the map (again something about terrain evaluation. but this time, movement cost).

#42 loxotron

loxotron

    Sergeant

  • Forum Members
  • PipPipPip
  • 18 posts

Posted 21 June 2006 - 06:00 PM

any news about ai? serge, maybe you should start to make it? :)
and maybe we should to make singleplayer different from xcom1, 2
the project will be more interesting for peoples i think
mm why i asked all this.. because this project is more stable and it has updates regulary :) and all other xcom projects in reality is dead or very bad made :(
your opinion?
the last beta is very stable i think

Edited by loxotron, 21 June 2006 - 06:02 PM.

I'm an big big LOL ..)

#43 Sporb

Sporb

    UFO2000 Staff

  • Moderators
  • PipPipPipPip
  • 739 posts

Posted 21 June 2006 - 08:46 PM

currently the game is getting a tweak n polish. Since we already have hotseat and interweb play AI can wait.

#44 Nightwolf

Nightwolf

    Sergeant

  • Forum Members
  • PipPipPip
  • 12 posts

Posted 07 July 2006 - 05:34 PM

currently the game is getting a tweak n polish. Since we already have hotseat and interweb play AI can wait.

<{POST_SNAPBACK}>


I really dont like playing against humans. Instead, i really like playing coop games against computer. (Homm is GREAT in this mode)

Please, think about adding IA soon...

#45 hitmark

hitmark

    Sergeant

  • Forum Members
  • PipPipPip
  • 10 posts

Posted 08 July 2006 - 04:49 PM

glad to see the topic isnt totaly dead...

i see from a diffrent thread that one can program/script random squads using lua.

could something similar be done to create atleast a basic kinda ai?

#46 the_unfrgiven

the_unfrgiven

    Sergeant

  • Forum Members
  • PipPipPip
  • 27 posts

Posted 12 July 2006 - 11:06 AM

I'm pretty sure this isn't possible, but is there any way to use the AI for xcom1 or2??? I know that we are allowed some use of the data, is there any way to modify the original AI for use here??

#47 Oldtype

Oldtype

    Sergeant

  • Forum Members
  • PipPipPip
  • 67 posts

Posted 12 July 2006 - 01:13 PM

I'm pretty sure this isn't possible, but is there any way to use the AI for xcom1 or2??? I know that we are allowed some use of the data, is there any way to modify the original AI for use here??

We are not realy allowed to use the data, it is just that no one complains or in some cases that they can not do anything about it if they wanted to. That is also one of the reasons why there is some effort to make the game playable without that old data.
Using the AI from the original is not feasible, it would require a lot of reverse engeneering and that is usually about the same amount of work (or more) as writing your own. The game is too different from the old games for it to make sense to use it anyway.

#48 Blitzen

Blitzen

    Sergeant

  • Forum Members
  • PipPipPip
  • 80 posts

Posted 13 July 2006 - 01:53 AM

I was at work and I had a brilliant Idea for a good AI.



First give every bit of terrain a number from 0-10

No terrain = 0
floors = 1
anything that blocks LOS gets default of 5 more than that (up to a 10) for the streangth of armor it has.



Then make the computer move it's charachters allong routs of safety while also using a search method. It would be easy to make the ai hide to.... Just make it turn around and run towards the nearest tile that is surrounded by the best numbers and crouch...
[MC]T_II_JudgmentDay
[MC]T_II_Judgment
[MC]TerminatorII
Blitzen

From:
Freelancer
Hyperiums

And Now UFO2000!

Detective: "He died from a drug overdose."
Officer: "Really? Which one?"
Detective: "Lead."

#49 the_unfrgiven

the_unfrgiven

    Sergeant

  • Forum Members
  • PipPipPip
  • 27 posts

Posted 14 July 2006 - 02:57 PM

If (and when) AI is implemented, something must be done about the Aliens being able to locate you psionically through walls. Playing Xcom1 right now, up against a sectoid supply ship. Have the whole map cleared (except the ship) and I have one unit in a building who keeps getting bonged. Not MC yet, just panics, but I'm finding it really hard not to assinate the poor bastard.

#50 hitmark

hitmark

    Sergeant

  • Forum Members
  • PipPipPip
  • 10 posts

Posted 14 July 2006 - 03:25 PM

are there psionics in ufo2000 at all?

if not then said problem will not be a issue in ufo2000 ;)