Qbasicnews.com
February 23, 2020, 07:48:16 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1] 2 3 4
  Print  
Author Topic: computer game AI  (Read 9973 times)
momoguru
Forum Regular
**
Posts: 131



« on: August 16, 2003, 11:09:55 AM »

im almost done with the beta version of a turn based strategy game similar to warcraft or age of empires. its tile based and relatively simple... however i was wondering if anyone has any good ideas or techniques for AI programming. My only guess is a huge set of conditions, but im not sure if thats the right direction i need to go. anyway, if you know anything about computer AI, id appreciate any suggestions u might have.
Logged

url]http://qb45.think-new.com[/url]
Mech1031
Na_th_an
*****
Posts: 1536



WWW
« Reply #1 on: August 16, 2003, 11:43:40 AM »

You can drop progger a message, him and agamemnus are workin on a RTS, but seeming as yours is turn based, you might want to go in a different direction.  

1) you could have it based on several conditions
2) Have the AI do it's own thing(depending on difficulty) until you get within certain bounds of them.
3) make the AI have objectives (if gold=0 then workers mine gold, if gold=3000 then workers  hunt, if food=3000 then if gold=3000 then build soldiers(5))so on and so forth...

but of course you would have to combine 3 and 2 for the best results...
Logged

the mind is a beautiful thing, use it and make the world a more beautiful place.
RST
Wandering Guru
***
Posts: 326



« Reply #2 on: August 16, 2003, 07:03:14 PM »

If you know much about genetic programming, etc., you might be able to have the computer teach itself the AI, if the game isn't *too* complex.

If not, then email me the beta, and I'll try. But I won't promise anything.  Tongue
Logged
whitetiger0990
__/--\__
*****
Posts: 2964



WWW
« Reply #3 on: August 16, 2003, 09:23:10 PM »

sorry but i think it is funny to have a computer teach itself AI!
Logged


[size=10]Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.[/size]
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #4 on: August 16, 2003, 10:26:23 PM »

Email it to me, I'll give you some tips or code.. I love strategy games! Smiley
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Mech1031
Na_th_an
*****
Posts: 1536



WWW
« Reply #5 on: August 16, 2003, 10:52:56 PM »

Quote
have a computer teach itself AI


so your saying it will get smarter and smarter by the second, soon it will realize where the power cord/shut down button is and send many volts of electricity to those areas in defense.
Logged

the mind is a beautiful thing, use it and make the world a more beautiful place.
whitetiger0990
__/--\__
*****
Posts: 2964



WWW
« Reply #6 on: August 16, 2003, 11:14:36 PM »

The moment you made a computer that learn every second it would learn its own weaknesses and put up protection. then it will ind out that its not the only one of that type of computer and it will virus all the other computers of that type and gather info about them.
Logged


[size=10]Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.[/size]
momoguru
Forum Regular
**
Posts: 131



« Reply #7 on: August 17, 2003, 01:51:22 AM »

well, its like this...

there are 3 tile types, the terrain, the building, and the units
the terrain holds the resources (gold,wood,stone,ore, food)
the buildings increase population limit, and open other build trees
the buildings can also upgrade to big and better buildings
the units of course build, and attack with different stats.
ive got the whole 'player' turn done, all resourcing, building and attacking. now all thats left is the AI. i was thinking of making the AI a completely different program that just manipulates the saved data of the current game. so after you finish your turn, the second exe is run (the AI exe) which does nothing more than check for conditions, and manipulates the existing data of the saved state file. once this is done, the main game exe is restored and you now can can countine with your next turn.

pros of this idea, i can have plenty of room to code a huge AI with as many conditions and such as i need. there no graphics needed in this exe cause all the graphics are controled thru the game exe (which is the PLAYERS turn exe). so basically, the AI exe does nothing more than change around some data in the saved state of the players last turn.

cons, i cant show you what the computer is doing as he is doing it, because there are not routines for the graphics in the Ai exe, so when hes done computing his moves, you only get to see the finished product of his choices.

i have no clue how to make it learn, but since i know the game inside out, i can program an AI as good as I play.

illl post a download 2moro for anyone who wants to check out where im at.
Logged

url]http://qb45.think-new.com[/url]
ak00ma
Ancient Guru
****
Posts: 669



« Reply #8 on: August 17, 2003, 03:23:43 AM »

Learning AI is hard to do. I think you should go to http://www.GameDev.net
Though it's not about QB, there are some interesting AI articles which are explained without using a specific language like C/C++ or VB. So EVERY coder can use this stuff.
Logged

B 4 EVER
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #9 on: August 17, 2003, 08:58:29 AM »

A single behavioural AI must fit in. Just learn about state machines and have a state machine on every feature you want, for example a state machine which controls goodies recollection, another one who controls expansional behaviour, another one that takes care of building cities, and just let the states flow depending on your game variables.
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
potato
Ancient QBer
****
Posts: 409



WWW
« Reply #10 on: August 17, 2003, 01:19:23 PM »

Damn AIs. If you've seen my game, (saga.hokuten.net), I can explain how I made that? It's no A*, but it works (most of the time) using only two arrays.
Logged

ammit potato!
Mech1031
Na_th_an
*****
Posts: 1536



WWW
« Reply #11 on: August 17, 2003, 02:46:38 PM »

pft, who needs A.I.  I just make remakes of old 2600 games.  but in all seriousness, A.I. is something that us humans have yet to accomplish completely...
Logged

the mind is a beautiful thing, use it and make the world a more beautiful place.
RST
Wandering Guru
***
Posts: 326



« Reply #12 on: August 18, 2003, 05:07:04 PM »

Quote from: "mech1031"
pft, who needs A.I.  I just make remakes of old 2600 games.  but in all seriousness, A.I. is something that us humans have yet to accomplish completely...


Heck, some humans can't even manage NI (natural intelligence).

But I don't think he's after an AI that can pass the whatever-you-call-it test. That's a technical term, BTW.

If you can just write a program that spawns a bunch of AI scripts (If/then statements triggered by variable parameters), has them compete in your game, takes the most effective and recombines them in different ways, then repeats a few billion times while you leave the computer on over the weekend... You should have a pretty good script.

It might be easier just to hand-code all the stuff, but that wouldn't be as fun, now woud it?
Logged
Phydaux
Senior Member
**
Posts: 200



« Reply #13 on: August 18, 2003, 10:28:46 PM »

Quote from: "mech1031"
pft, who needs A.I.  I just make remakes of old 2600 games.  but in all seriousness, A.I. is something that us humans have yet to accomplish completely...
A.I. Is something us humans have barley scratched the surface of; A.I. as a science is still so early that it's barely a featus yet. Smiley
Logged

url=http://www.spreadfirefox.com/?q=affiliates&id=60131&t=79][/url]
END OF LINE.
momoguru
Forum Regular
**
Posts: 131



« Reply #14 on: August 19, 2003, 01:16:14 AM »

ive got it to where the units move around and chase down anything close to attack it.
Logged

url]http://qb45.think-new.com[/url]
Pages: [1] 2 3 4
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!