Space Fight AI Tournament Idea

User projects written in or related to FreeBASIC.
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 15, 2006 21:49

yes thats the kind of hackish thinking i was hoping for! DO IT!!
Imortis
Moderator
Posts: 1641
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Postby Imortis » May 15, 2006 22:01

I would love to participate, but as of right now, I am unable to download your files. I will have to wait until tomarrow...
Thrawn89
Posts: 477
Joined: Oct 08, 2005 13:12

Postby Thrawn89 » May 16, 2006 1:57

Hmm, not quite done yet, still gotta add that look ahead tracker...only contains a very simple dodger, went way beyond my level in math, but I'd thought Id submit it anyways: Download Here

Oh, btw, it beat up yours pretty good in my trial runs lol:

Code: Select all


--- 05-15-2006 21:44:26 ---
Mambazo beat Thrawn
--- 05-15-2006 21:45:09 ---
Thrawn beat Mambazo
--- 05-15-2006 21:45:24 ---
Thrawn beat Mambazo
--- 05-15-2006 21:45:53 ---
Thrawn beat Mambazo
--- 05-15-2006 21:47:34 ---
Thrawn beat Mambazo
--- 05-15-2006 21:48:37 ---
Mambazo beat Thrawn
--- 05-15-2006 21:50:10 ---
Thrawn beat Mambazo


;-)

Tell me how it does

EDIT:
You know what would be cool? If you modified your source to make it a free for all between all of the AIs we made lol

Thrawn
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 16, 2006 2:28

Very cool! Your AI kicks Mambazo_AI!...

However, Mambazo2_AI took a glorious revenge! :P

Code: Select all

---------------------------
--- 05-16-2006 03:24:23 ---

Mambazo2 beat Thrawn

Match Duration: 12.14 seconds

Thrawn stats:-
Health:-24
Power: 13.78%
Accuracy: 12.50%
Last words:

Mambazo2 stats:-
Health: 100
Power: 25.92%
Accuracy: 46.15%
Last words: Engaging.

---------------------------
--- 05-16-2006 03:24:43 ---

Mambazo2 beat Thrawn

Match Duration: 12.13 seconds

Thrawn stats:-
Health:-34
Power: 10.65%
Accuracy: 14.28%
Last words:

Mambazo2 stats:-
Health: 89
Power: 51.51%
Accuracy: 50.00%
Last words: Engaging.

---------------------------
--- 05-16-2006 03:26:11 ---

Mambazo2 beat Thrawn

Match Duration: 84.08 seconds

Thrawn stats:-
Health:-49
Power: 83.82%
Accuracy:  6.89%
Last words:

Mambazo2 stats:-
Health: 38
Power: 51.25%
Accuracy: 10.81%
Last words: Locking onto target.


Having all the AI's compete together is a great idea! I'll have to write a NanoFrenzy.bas ;)
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 16, 2006 2:34

Doing a little tournament with our 3 AI's (cha0s c'mon!)

The line-up:-

Thrawn Vs Pritchard

Pritchard Vs Mambazo2

Thrawn Vs Mambazo2

Each match will be a best of 3, I'll post a link to the results.txt!
STAY TUNED!
Last edited by mambazo on May 16, 2006 2:37, edited 1 time in total.
Zamaster
Posts: 1024
Joined: Jun 20, 2005 21:40
Contact:

Postby Zamaster » May 16, 2006 2:34

Thatd be maddening! Im still updating mine! It now runs away from you constantly, and when at a safe distance, it starts firing on your trajectory and behind you so there is no escape!!!! BWAHAHAHA!!!
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 16, 2006 2:39

I can't wait!
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 16, 2006 2:46

Summary of results!!!

Code: Select all

Pritchard Vs Thrawn
-------------------

Thrawn: 2
Pritchard: 1


Pritchard Vs Mambazo2
---------------------

Mambazo2: 3
Pritchard: 0


Thrawn Vs Mambazo2
------------------

Mambazo2: 3
Thrawn: 0


The full Results.txt can be viewed here...

http://mambazo.langfordtavern.com/zips/Results.txt
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 16, 2006 2:51

NanoShips_AI.zip now contains all submitted AI's so far so you can battle them to your hearts content!

Note also the updates to NanoHost.bas

http://mambazo.langfordtavern.com/zips/NanoShips_AI.zip
Pritchard
Posts: 5492
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

Postby Pritchard » May 16, 2006 3:21

Holy crap Mambazo, I lost all times then, eh? Oh well. I think I'm really out now, seeing as I don't know any math beyond what I already programmed.

Heck, I don't understand a good amount that I did put in. It's been nice playing, and I hope to find alternative ways to beat the crap out of you guys.

You've obviously improved Mambazo2 like crazy, seeing as you had 100% accuracy and a 2 second kill on Thrawn the one time.
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 16, 2006 3:27

That match was a fluke, they started right next to eachother and well, Mambazo2 was the better dodger ;)

The new Mambazo2_AI.bi is included in the latest NanoShips_AI.zip

The dodging code is very special. It knows instantly, regardless of distance, if an incoming laser is on a collision course. So if a laser will 'just miss', the ship ignores it and concentrates on predicting the enemy location :D
Pritchard
Posts: 5492
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

Postby Pritchard » May 16, 2006 3:28

mambazo wrote:It knows instantly
I bet it's more like, it knows after it updates it's position once :D

I guess I could adapt my .bi to that. I mean yeah, it doesn't sound too hard. I could also update it to track my position and figure out where it'll be moving in a few seconds, to better the laser tracking.

I'd have to use Your Code and Cha0s' code to do that though. *sigh* If only I understand sin and cos and abs.
Last edited by Pritchard on May 16, 2006 3:30, edited 1 time in total.
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 16, 2006 3:30

Well, yah, you got me there, it knows post-instantly ;)

EDIT: What I'm looking forward to seeing is, if someone manages to write code to accurately predict the enemy location (including its acceleration, arc of motion etc), and then fire at the exact perfect point to account for the time it takes for your laser to get there. I've been trying to code this for hours and, well, no, no its not easy at all, haven't a clue how to do it. Mambazo2_AI takes 2 estimates and then aims at the midpoint, so its far from perfect, but doesn't do too badly.
mambazo
Posts: 652
Joined: Jul 17, 2005 13:02
Location: Ireland
Contact:

Postby mambazo » May 16, 2006 3:40

COS will give you the x coord of a point on the circumference of a circle...

e.g.

x = COS(AngleInRadians) * Radius

will give you the x coord of a point on a circle, at that angle (think of it like a clock, 90 Degrees would be 6 o clock, 180 Degrees is 9 o clock).

SIN gives you the y coord.

ABS just means absolute, and causes a negative value to be positive, and a positive value to stay positive.
cha0s
Site Admin
Posts: 5317
Joined: May 27, 2005 6:42
Location: Illinois
Contact:

Postby cha0s » May 16, 2006 3:44

http://fileanchor.com/26694-d

compiles in .15 now and doesn't use static. i came up with a way that isn't hackish, but instead elegant. hope you don't mind =p

Return to “Projects”

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], MSN [Bot] and 2 guests