News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Help with AI for my new game. Synthedic Intellegence.

Started by ScottieB, July 10, 2014, 07:28:31 AM

Previous topic - Next topic

ScottieB

Here is what I got so far.
Yesterday I try so deductive reasoning but it pretty buggy so I reverted but to the day before.
I'm trying to make the computer more smart that is without (Cheating!)
If anyone can help me come up with some simple rules I would be thankful.
You drop ships with left click and spin ships with right during placement.
then you point in click bombs in the computer grid while he is random for now.
Thanks
ScottieB

BlinkOk


basil99

http://www.red3d.com/cwr/steer/gdc99/

Java examples:

http://www.red3d.com/cwr/steer/
Free Games Site - http://vespacrabro.com

ScottieB

Here is some code I built off of a Battleship A.I. routine online.
It keeps track of numbers in a grid.
High numbers tell middle of lines.
My question is this.
How can I tell the largest area with the highest numbers both vertical and horizontal?
Meaning the two longest running lines in both directions instead of just high numbers in long lines.
Please any help would be greatly appreciated.
Thanks
ScottieB

BlinkOk

if i understand you correctly i think i would reduce the resolution of your grid.
ie. right now your grid resolution is 1:1. you could change that to 1:4 by consolidating grid spaces
something like this;
take grid positions (1,1) (1,2) (2,1) and (2,2) and add up all the values in those grid position and they become a new grid position in a new array with that total. then do the same with (1,3) (1,4) (2,3) and (2,4) and so on. Once you did that you could examine the array and see if you have a "stand out" candidate.
kind of like squinting your eyes, only with code

ps: you could prolly just maintain the two arrays as you go. ass you add to the 1:1 array you could also add to the 1:4 array (or even a 1:9 array as well, and so on)