The Gang Garrison 2 Forum
May 25, 2013, 04:13:57 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Chat with us on IRC: http://ganggarrison.com/irc.html
Server: irc.esper.net, Channel: #gg2
 
   Home   Help Search Login Register  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 »
  Print  
Author Topic: Tempest Bot [v5_3]  (Read 35598 times)
Orpheon
2011 Haxxy Award Winner
*
Online Online

Posts: 5836


Developer


« Reply #345 on: July 17, 2011, 05:33:13 am »

Nice, just don't use "instance_exists" for nearestTarget and for object. Use "!= -1".

This is also called from the player, all "player." will give errors.

I'll go through your code in detail sometime else, though it looks great.

This is my last day before I have to go, and I also have to pack today, so I'll update OHU with the newest of what I have, and let you play with that AI.
You guys have the entire source, the only thing you don't have is the newest version of the Demoman aiming. But I don't think you'll need that.

In this version, I fixed Arena, it is now working, more or less. There are still one-two bugs that need fixing, but meh.

Here

EDIT: Create a text file called "banlist.txt" in the same directory, or you'll get errors. My bad.

Good luck.
« Last Edit: July 17, 2011, 06:57:59 am by Orpheon [ONE] » Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
MTK5012
2011 Haxxy Finalist
*
Offline Offline

Posts: 738


I was Gangsterman


« Reply #346 on: July 17, 2011, 06:54:17 am »

Nice, just don't use "instance_exists" for nearestTarget and for object. Use "!= -1".
but if i use !=-1,it will force the bot to get to x=0,i tested,instance_exists work better
This is also called from the player, all "player." will give errors.
that my version,i didnt converted it yet,sorry
I'll go through your code in detail sometime else, though it looks great.
thanks
Logged
Orpheon
2011 Haxxy Award Winner
*
Online Online

Posts: 5836


Developer


« Reply #347 on: July 17, 2011, 02:34:21 pm »

Ok, I'm gone.

Gangsterman, take the source and try to implement your code. If you need spawning a specific class, just put at the end of CreateBot "player.class = CLASS_SPY" or whatever.
Also disable the things in BotAim. You'll see what I mean.

Gadolinium, keep thinking. If you could figure out a way to automatically create a node network that computes jumps and other things, the bot would almost be nearing completion.

Good luck and bye!
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Unsung Hero
Hero Member
*****
Offline Offline

Posts: 3086


Classy Cynic


« Reply #348 on: July 17, 2011, 04:10:03 pm »

Can someone with v0.6 make it into a .exe file?
Logged


Swimming is all about speshul powah. I have mastered swimming in 721 different strokes.
Proud member of [PHS]
MTK5012
2011 Haxxy Finalist
*
Offline Offline

Posts: 738


I was Gangsterman


« Reply #349 on: July 17, 2011, 07:49:23 pm »

=/
PS:don't punch me
Logged
Unsung Hero
Hero Member
*****
Offline Offline

Posts: 3086


Classy Cynic


« Reply #350 on: July 17, 2011, 08:21:49 pm »

Huh?

Okay, I know there's some ridiculously simple answer to this but why isn't there any spies option for it?
« Last Edit: July 17, 2011, 08:29:35 pm by ]LNW[ Unsung Hero /FF/ » Logged


Swimming is all about speshul powah. I have mastered swimming in 721 different strokes.
Proud member of [PHS]
MTK5012
2011 Haxxy Finalist
*
Offline Offline

Posts: 738


I was Gangsterman


« Reply #351 on: July 17, 2011, 08:51:03 pm »

click the face on the last post,u will receive exe version
if you want spy,i will make a bot loader for you guys
ill post it over haxxy mods section
Logged
Gadolinium
Newbie
*
Offline Offline

Posts: 9


« Reply #352 on: July 21, 2011, 01:47:32 am »

I'm really not sure how floors work in GG2; it seems like they don't count as obstacles, so I don't know how to detect them.
I'm not that good at actually coding stuff, but for a node network... what about something that mass-produces nodes and then cuts them down to actually important ones?

For example, you could first make a program that goes to the very leftmost point in the map, and sees at what heights you can stand at that x-value. I'm not sure how to implement this but you could probably do something like dropping a bot from the sky until he hits something and putting a node there, then dropping a bot from below that point, etc. There's almost certainly a more efficient way, though (draw a vertical line, find collisions, and then place nodes above those collisions?). So the map would be populated with a huge amount of nodes at everywhere you could possibly stand.

Afterwards, you would draw a web to indicate fork points, starting from the highest nodes. You'd delete nodes that were in a straight horizontal line, then at the remaining nodes, find places to jump down, etc.
A very simple idea - this won't be the final one as it doesn't deal with tons of cases and is extremely inefficient - would be this: go to a node. Look one "step" left. If there's a collision there, go up and mark the first node you see; otherwise, go down and mark the first node you see. Afterwards, go up from the marked node to the height of a jump, and mark any nodes you see on the way. Repeat for the right side. Draw pathing lines between your node, and the nodes you've marked. If, at the end of this, you have more than one node on any side, mark those nodes, and your starting node, with fork markers. Otherwise, delete your node, and extend any lines connected to it to the next node (e.g. if A is connected to YOURNODE on the left, and B is connected to YOURNODE on the right, connect A to B). Go to a new node and repeat.

Do you think this is feasible? If so, I'll continue working on it - there are a bunch of less common cases that are difficult to handle, like when you have to jump across a large gap that is both far away horizontally and far down vertically. I'll also make some illustrations with real maps to show what I mean more clearly.
« Last Edit: July 21, 2011, 01:47:50 am by Gadolinium » Logged
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #353 on: July 21, 2011, 03:14:21 am »

collision with wall should work like this
in the character object there is an event called collision with obstacle (its basicly the parent for all solid objects like the maps collision mask) and the code inside that is
Code:
characterHitObstacle()
which as you know runs the collision script made by the gg2 devs
Logged

Orpheon
2011 Haxxy Award Winner
*
Online Online

Posts: 5836


Developer


« Reply #354 on: July 21, 2011, 04:23:28 am »

I found an internet cafe a few km from my hotel.

I'll be short, because I don't have much time.

All collisions are tested with the object "Obstacle".
The wallmask objects then simply inherit the Obstacle object.
We can test any position whether it's in the wallmask an we can use collision_line()
EDIT: Sorry Derp, I didn't read your thing correctly.

And about the nodes, I thought of an other way: Learn from humans.
The bots would need a global Observer, tha monitors all human and bot movements.

It'll need a way to standarize paths to one line, this is probably best done by taking the border between the ground and the air.
Then for each map, we'll just have to play with bots for a while, and the more we play they'll get better and better. Then we save thoe nodes into a file and upload them here, plugin-wise.

But your ideas aren't bad either.

I hate typing on this piece of sh** of a public terminal.
Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
Gadolinium
Newbie
*
Offline Offline

Posts: 9


« Reply #355 on: July 21, 2011, 10:24:09 am »

Hmmm, that does eliminate the problem of trying to account for every possible case. I think that should probably be the way to go, then.
Logged
Flaw
Full Member
***
Offline Offline

Posts: 113


« Reply #356 on: July 21, 2011, 12:23:30 pm »

Question, how did you fix the scoreboard bug? AKA, when creating a Player object, making sure it doesn't get socket checked, etc, opening the scoreboard will give errors for "stats[POINTS]", even though that exists.
Logged
Derpduck [LORD]
2011 Haxxy Finalist
*
Offline Offline

Posts: 3529



« Reply #357 on: July 21, 2011, 03:18:19 pm »

Never seen this, but it uses a different object which is almost a duplicatof the player object
Logged

Orpheon
2011 Haxxy Award Winner
*
Online Online

Posts: 5836


Developer


« Reply #358 on: July 22, 2011, 08:51:08 am »

Question, how did you fix the scoreboard bug? AKA, when creating a Player object, making sure it doesn't get socket checked, etc, opening the scoreboard will give errors for "stats[POINTS]", even though that exists.
If you did the same as me, you have to parse several places in GameServerBeginStep for socket checks, not just the creation.

And I don't recall ever having a scoreboard bug, though other variables like "object" were missing, so I'm assuming you've got the same problem.

Also, don't forget making your bot object persistent.



This thread is mostly dead because I want to move everything to the Orpheon's Hosting Utilities thread. Please go there.
The bot there is better, featuring for example a healer bot and more.
« Last Edit: August 08, 2011, 07:14:46 am by Orpheon [ONE/RA] » Logged

Your mind is software. Program it.
Your body is a shell. Change it.
Death is a disease. Cure it.
Extinction is approaching. Fight it.
[scootrush] Neewey
Newbie
*
Offline Offline

Posts: 41


Herp. Derp. Herpalurp.


« Reply #359 on: September 16, 2011, 07:37:52 pm »

Logged

Dat. Herp. Derp. z5

mah steam... Drolling
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.438 seconds with 18 queries.