Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Seminar-HFO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
Seminar-HFO
Commits
944de933
You need to sign in or sign up before continuing.
Commit
944de933
authored
Jul 16, 2017
by
drallensmith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial try on improving MARK_PLAYER
parent
889fd855
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
example/defense_2v2.sh
example/defense_2v2.sh
+14
-0
src/agent.cpp
src/agent.cpp
+2
-0
No files found.
example/defense_2v2.sh
0 → 100755
View file @
944de933
#!/bin/bash
# HAS TO BE RUN FROM EXAMPLE DIR DUE TO hand_coded_defense_agent CONFIG!
../bin/HFO
--offense-npcs
=
2
--defense-agents
=
1
--defense-npcs
=
1
--trials
20
--headless
--port
=
7000 &
sleep
5
./hand_coded_defense_agent &> agent1.txt &
sleep
5
# The magic line
# $$ holds the PID for this script
# Negation means kill by process group id instead of PID
trap
"kill -TERM -
$$
"
SIGINT
wait
\ No newline at end of file
src/agent.cpp
View file @
944de933
...
@@ -804,8 +804,10 @@ bool Agent::doMarkPlayer(int unum) {
...
@@ -804,8 +804,10 @@ bool Agent::doMarkPlayer(int unum) {
int
count
=
0
;
int
count
=
0
;
for
(
PlayerPtrCont
::
const_iterator
it
=
wm
.
opponentsFromSelf
().
begin
();
it
!=
o_end
;
++
it
)
{
for
(
PlayerPtrCont
::
const_iterator
it
=
wm
.
opponentsFromSelf
().
begin
();
it
!=
o_end
;
++
it
)
{
if
(
(
*
it
)
->
distFromBall
()
<
5
)
{
if
(
(
*
it
)
->
distFromBall
()
<
5
)
{
if
((
kicker_unum
==
-
1
)
||
(
kicker_unum
!=
unum
))
{
// try to obey action instruction
kicker_pos
=
(
*
it
)
->
pos
();
kicker_pos
=
(
*
it
)
->
pos
();
kicker_unum
=
(
*
it
)
->
unum
();
kicker_unum
=
(
*
it
)
->
unum
();
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment