public inbox for xconq7@sourceware.org
 help / color / mirror / Atom feed
* Problem compiling new version of ai_plan_research
@ 2004-09-08  1:51 Lincoln Peters
  2004-09-08  3:39 ` Eric McDonald
  2004-09-08  3:47 ` Politics Elijah Meeks
  0 siblings, 2 replies; 9+ messages in thread
From: Lincoln Peters @ 2004-09-08  1:51 UTC (permalink / raw)
  To: Xconq list

I think that I almost have a preliminary version of the improved
ai_plan_research function.  My new version assigns value to each
available advance as follows:

1. Add 1 to its value per unit that the advance enables.
2. If it multiplies production of any material by a value greater than
1, add the multiplier to its value.
3. If it multiplies production of any material by a value less than 1,
subtract the reciprocal of the multiplier to its value.
4. If it adds production of any material to units, add that number to
the its value.

(I have not tried to make it consider the time to research because I
have not yet delved deep enough into the kernel to add the required
statistical code.)


However, once I worked out all (most?) of the bugs I'd inevitably
introduced to ai_plan_research in the process of re-writing it, I got
the following error at the end of the "make" process:

gcc -o xconq -g -O2 -ansi -pedantic -g   -DHAVE_ACDEFS_H -I. -I./.. -I./../kernel -I./../missing -I/usr/include/tcl8.4 -I/usr/include/tcl8.4/tk-private/generic    -I/usr/X11R6/include    -L/usr/X11R6/lib tkunix.o ./libtkui.a ./libtkimf.a  ../kernel/libconq.a ../kernel/libconqlow.a ../missing/libmissing.a -lXext -lXmu -lX11  -L/usr/lib -ltcl8.4 -L/usr/lib -ltk8.4  -L/usr/X11R6/lib -lX11 -ldl -lpthread -lieee -lm -ldl
../kernel/libconq.a(ai.o)(.text+0x4771): In function `ai_plan_research':
/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1840: undefined reference to `net_side_research'
../kernel/libconq.a(ai.o)(.text+0x4798):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1805: undefined reference to `ua_advance_needed_to_build'
../kernel/libconq.a(ai.o)(.text+0x47aa):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1810: undefined reference to `ua_advance_multiply_production'
../kernel/libconq.a(ai.o)(.text+0x47b9):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1811: undefined reference to `ua_advance_multiply_production'
../kernel/libconq.a(ai.o)(.text+0x47c8):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1816: undefined reference to `ua_advance_add_production'
../kernel/libconq.a(ai.o)(.text+0x47ed):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1812: undefined reference to `ua_advance_multiply_production'
../kernel/libconq.a(ai.o)(.text+0x4802):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1813: undefined reference to `ua_advance_multiply_production'
collect2: ld returned 1 exit status
make[1]: *** [xconq] Error 1
make[1]: Leaving directory `/home/lincoln/Projects/xconq/xconq/tcltk'
make: *** [all-tkconq] Error 2

It looks like I am unable to access the functions that I need to
determine the value of an advance!

---
Lincoln Peters
<sampln@sbcglobal.net>

I want to be the white man's brother, not his brother-in-law.
		-- Martin Luther King, Jr.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problem compiling new version of ai_plan_research
  2004-09-08  1:51 Problem compiling new version of ai_plan_research Lincoln Peters
@ 2004-09-08  3:39 ` Eric McDonald
  2004-09-08  5:20   ` Lincoln Peters
  2004-09-08  3:47 ` Politics Elijah Meeks
  1 sibling, 1 reply; 9+ messages in thread
From: Eric McDonald @ 2004-09-08  3:39 UTC (permalink / raw)
  To: Lincoln Peters; +Cc: Xconq list

Lincoln Peters wrote:

> gcc -o xconq -g -O2 -ansi -pedantic -g   -DHAVE_ACDEFS_H -I. -I./.. -I./../kernel -I./../missing -I/usr/include/tcl8.4 -I/usr/include/tcl8.4/tk-private/generic    -I/usr/X11R6/include    -L/usr/X11R6/lib tkunix.o ./libtkui.a ./libtkimf.a  ../kernel/libconq.a ../kernel/libconqlow.a ../missing/libmissing.a -lXext -lXmu -lX11  -L/usr/lib -ltcl8.4 -L/usr/lib -ltk8.4  -L/usr/X11R6/lib -lX11 -ldl -lpthread -lieee -lm -ldl
> ../kernel/libconq.a(ai.o)(.text+0x4771): In function `ai_plan_research':
> /home/lincoln/Projects/xconq/xconq/kernel/ai.c:1840: undefined reference to `net_side_research'

'net_set_side_research' might work better.

> ../kernel/libconq.a(ai.o)(.text+0x4798):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1805: undefined reference to `ua_advance_needed_to_build'
> ../kernel/libconq.a(ai.o)(.text+0x47aa):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1810: undefined reference to `ua_advance_multiply_production'
> ../kernel/libconq.a(ai.o)(.text+0x47b9):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1811: undefined reference to `ua_advance_multiply_production'
> ../kernel/libconq.a(ai.o)(.text+0x47c8):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1816: undefined reference to `ua_advance_add_production'
> ../kernel/libconq.a(ai.o)(.text+0x47ed):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1812: undefined reference to `ua_advance_multiply_production'
> ../kernel/libconq.a(ai.o)(.text+0x4802):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1813: undefined reference to `ua_advance_multiply_production'

'ua_needed_to_build' not 'ua_advance_needed_to_build'.
Likewise with the others.
The "a" in "ua" stands for "advance".

Eric

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Politics
  2004-09-08  1:51 Problem compiling new version of ai_plan_research Lincoln Peters
  2004-09-08  3:39 ` Eric McDonald
@ 2004-09-08  3:47 ` Elijah Meeks
  2004-09-08  8:27   ` Politics Lincoln Peters
  1 sibling, 1 reply; 9+ messages in thread
From: Elijah Meeks @ 2004-09-08  3:47 UTC (permalink / raw)
  To: Xconq list

Does anyone plan to extend the side options, maybe put
in some crude diplomatic functions?


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problem compiling new version of ai_plan_research
  2004-09-08  5:20   ` Lincoln Peters
@ 2004-09-08  3:49     ` Eric McDonald
  2004-09-08  3:53       ` Lincoln Peters
  0 siblings, 1 reply; 9+ messages in thread
From: Eric McDonald @ 2004-09-08  3:49 UTC (permalink / raw)
  To: Lincoln Peters; +Cc: Xconq list

Lincoln Peters wrote:

> gcc -o xconq -g -O2 -ansi -pedantic -g   -DHAVE_ACDEFS_H -I. -I./.. -I./../kernel -I./../missing -I/usr/include/tcl8.4 -I/usr/include/tcl8.4/tk-private/generic    -I/usr/X11R6/include    -L/usr/X11R6/lib tkunix.o ./libtkui.a ./libtkimf.a  ../kernel/libconq.a ../kernel/libconqlow.a ../missing/libmissing.a -lXext -lXmu -lX11  -L/usr/lib -ltcl8.4 -L/usr/lib -ltk8.4  -L/usr/X11R6/lib -lX11 -ldl -lpthread -lieee -lm -ldl
> ../kernel/libconq.a(ai.o)(.text+0x47ad): In function `ai_plan_research':
> /home/lincoln/Projects/xconq/xconq/kernel/ai.c:1811: undefined reference to `ua_multiply_production'
> ../kernel/libconq.a(ai.o)(.text+0x47bc):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1812: undefined reference to `ua_multiply_production'
> ../kernel/libconq.a(ai.o)(.text+0x47cb):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1817: undefined reference to `ua_add_production'
> ../kernel/libconq.a(ai.o)(.text+0x47f0):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1813: undefined reference to `ua_multiply_production'
> ../kernel/libconq.a(ai.o)(.text+0x4805):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1814: undefined reference to `ua_multiply_production'

These tables are not listed in 'kernel/table.def'. If you want to get a 
list of what is supported, then just search for "DEF_UA" and "DEF_AA" in 
that file.

> One thing I do notice about the remaining errors is that they all
> involve parts of the code that are (supposed to be) implemented but are
> not used in any existing game modules.  Could that have something to do
> with the errors?

Hmmm... They do appear in the documentation but not in the code. Looks 
like yet another occurance of inconsistent docs and code.

Eric

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problem compiling new version of ai_plan_research
  2004-09-08  3:49     ` Eric McDonald
@ 2004-09-08  3:53       ` Lincoln Peters
  2004-09-08  3:54         ` Research of Advances and SDL UI Improvements Eric McDonald
  0 siblings, 1 reply; 9+ messages in thread
From: Lincoln Peters @ 2004-09-08  3:53 UTC (permalink / raw)
  To: Eric McDonald; +Cc: Xconq list

On Tue, 2004-09-07 at 20:06, Eric McDonald wrote:
> > One thing I do notice about the remaining errors is that they all
> > involve parts of the code that are (supposed to be) implemented but are
> > not used in any existing game modules.  Could that have something to do
> > with the errors?
> 
> Hmmm... They do appear in the documentation but not in the code. Looks 
> like yet another occurance of inconsistent docs and code.

In that case, I'll comment out this part of the code until these tables
are implemented.

---
Lincoln Peters
<sampln@sbcglobal.net>

Happiness isn't having what you want, it's wanting what you have.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Research of Advances and SDL UI Improvements
  2004-09-08  3:53       ` Lincoln Peters
@ 2004-09-08  3:54         ` Eric McDonald
  0 siblings, 0 replies; 9+ messages in thread
From: Eric McDonald @ 2004-09-08  3:54 UTC (permalink / raw)
  To: Xconq list

Lincoln Peters wrote:

> In that case, I'll comment out this part of the code until these tables
> are implemented.

I'll comment out the [ir]relevant documentation.

During my work on implementing unit research and side research support 
in the SDL interface, I discovered that unit research appears to be 
broken/unsupported in the kernel. Only side research appears to work. 
So, there seems to be a lot of little things broken regarding advances.

I just need to do a couple more tweaks to the SDL interface and then I 
think I'll be ready to provide a new prerelease for download. Quite a 
few bugfixes, and some improvements. Here is a sampling:
(1) Prompts for things like saving the game, choosing a build location, 
etc... now appear in the mouseover panel so that there is some indicator 
when the interface is in a "mode" and expecting an user response. (Note 
that the game does not actually save yet, but it pretends to, so that 
one can quit without loss of face (resignation).)
(2) Prefix args are accepted and apply to unit action buttons 
(construct, develop, change type, research) as is relevant 
(construction), as well as the keyboard commands. The mouseover panel 
displays the number of times a construction task will try to execute 
(from doctrine or prefix arg).
(3) If a prefix arg is not specified then the construction buttons 
indicate (via the mouseover panel) the construction run length provided 
by the doctrine (or 1, failing that).
(4) Unit research is supported, but presently useless (see above).
(5) Side research is supported.
(6) Clicking on a cell in which to construct now works correctly. 
Previously, the coords of the target cell were not being picked up.
(7) The title of the window is now of the form, "Xconq - <Game Title> - 
<Side Name> - <Turn Number>" and the taskbar caption is of the form, 
"Xconq - <Game Title>".
Etc, etc....

Hopefully, I'll make it available tomorrow or Thursday evening. After 
that, I will try to finish filling out the other possible unit action 
buttons: delay, skip, sleep, join formation, leave formation, gather 
materials, take needed materials from unit in range, resume stagnant 
build on unit in range, repair unit in range, give needed materials to 
unit in range, help build on unit in range, etc.... In survey mode, 
other possible buttons would include: cancel plan, wake, etc....

Eric

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Problem compiling new version of ai_plan_research
  2004-09-08  3:39 ` Eric McDonald
@ 2004-09-08  5:20   ` Lincoln Peters
  2004-09-08  3:49     ` Eric McDonald
  0 siblings, 1 reply; 9+ messages in thread
From: Lincoln Peters @ 2004-09-08  5:20 UTC (permalink / raw)
  To: Eric McDonald; +Cc: Xconq list

On Tue, 2004-09-07 at 18:51, Eric McDonald wrote:
> Lincoln Peters wrote:
> 
> > gcc -o xconq -g -O2 -ansi -pedantic -g   -DHAVE_ACDEFS_H -I. -I./.. -I./../kernel -I./../missing -I/usr/include/tcl8.4 -I/usr/include/tcl8.4/tk-private/generic    -I/usr/X11R6/include    -L/usr/X11R6/lib tkunix.o ./libtkui.a ./libtkimf.a  ../kernel/libconq.a ../kernel/libconqlow.a ../missing/libmissing.a -lXext -lXmu -lX11  -L/usr/lib -ltcl8.4 -L/usr/lib -ltk8.4  -L/usr/X11R6/lib -lX11 -ldl -lpthread -lieee -lm -ldl
> > ../kernel/libconq.a(ai.o)(.text+0x4771): In function `ai_plan_research':
> > /home/lincoln/Projects/xconq/xconq/kernel/ai.c:1840: undefined reference to `net_side_research'
> 
> 'net_set_side_research' might work better.

That much worked; I figured it out shortly after I sent the e-mail.

> 
> > ../kernel/libconq.a(ai.o)(.text+0x4798):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1805: undefined reference to `ua_advance_needed_to_build'
> > ../kernel/libconq.a(ai.o)(.text+0x47aa):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1810: undefined reference to `ua_advance_multiply_production'
> > ../kernel/libconq.a(ai.o)(.text+0x47b9):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1811: undefined reference to `ua_advance_multiply_production'
> > ../kernel/libconq.a(ai.o)(.text+0x47c8):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1816: undefined reference to `ua_advance_add_production'
> > ../kernel/libconq.a(ai.o)(.text+0x47ed):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1812: undefined reference to `ua_advance_multiply_production'
> > ../kernel/libconq.a(ai.o)(.text+0x4802):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1813: undefined reference to `ua_advance_multiply_production'
> 
> 'ua_needed_to_build' not 'ua_advance_needed_to_build'.
> Likewise with the others.
> The "a" in "ua" stands for "advance".

That sort of makes sense (I'd assumed that the names of the functions in
the C code would be identical to the associated GDL tables, aside from
prefixes such as "ua" and the use of underscores instead of dashes).  It
fixed some but not all of the errors.  Se below:

gcc -o xconq -g -O2 -ansi -pedantic -g   -DHAVE_ACDEFS_H -I. -I./.. -I./../kernel -I./../missing -I/usr/include/tcl8.4 -I/usr/include/tcl8.4/tk-private/generic    -I/usr/X11R6/include    -L/usr/X11R6/lib tkunix.o ./libtkui.a ./libtkimf.a  ../kernel/libconq.a ../kernel/libconqlow.a ../missing/libmissing.a -lXext -lXmu -lX11  -L/usr/lib -ltcl8.4 -L/usr/lib -ltk8.4  -L/usr/X11R6/lib -lX11 -ldl -lpthread -lieee -lm -ldl
../kernel/libconq.a(ai.o)(.text+0x47ad): In function `ai_plan_research':
/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1811: undefined reference to `ua_multiply_production'
../kernel/libconq.a(ai.o)(.text+0x47bc):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1812: undefined reference to `ua_multiply_production'
../kernel/libconq.a(ai.o)(.text+0x47cb):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1817: undefined reference to `ua_add_production'
../kernel/libconq.a(ai.o)(.text+0x47f0):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1813: undefined reference to `ua_multiply_production'
../kernel/libconq.a(ai.o)(.text+0x4805):/home/lincoln/Projects/xconq/xconq/kernel/ai.c:1814: undefined reference to `ua_multiply_production'
collect2: ld returned 1 exit status
make[1]: *** [xconq] Error 1
make[1]: Leaving directory `/home/lincoln/Projects/xconq/xconq/tcltk'
make: *** [all-tkconq] Error 2


One thing I do notice about the remaining errors is that they all
involve parts of the code that are (supposed to be) implemented but are
not used in any existing game modules.  Could that have something to do
with the errors?

---
Lincoln Peters
<sampln@sbcglobal.net>

I always had a repulsive need to be something more than human.
		-- David Bowie

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Politics
  2004-09-08  3:47 ` Politics Elijah Meeks
@ 2004-09-08  8:27   ` Lincoln Peters
  2004-09-08 19:30     ` Politics Eric McDonald
  0 siblings, 1 reply; 9+ messages in thread
From: Lincoln Peters @ 2004-09-08  8:27 UTC (permalink / raw)
  To: Elijah Meeks; +Cc: Xconq list

On Tue, 2004-09-07 at 19:27, Elijah Meeks wrote:
> Does anyone plan to extend the side options, maybe put
> in some crude diplomatic functions?

I think that some code exists for diplomatic functions, but either it
was never fully implemented or it never worked in the first place.

---
Lincoln Peters
<sampln@sbcglobal.net>

Everyone was born right-handed.  Only the greatest overcome it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Politics
  2004-09-08  8:27   ` Politics Lincoln Peters
@ 2004-09-08 19:30     ` Eric McDonald
  0 siblings, 0 replies; 9+ messages in thread
From: Eric McDonald @ 2004-09-08 19:30 UTC (permalink / raw)
  To: Lincoln Peters; +Cc: Elijah Meeks, Xconq list

On Tue, 7 Sep 2004, Lincoln Peters wrote:

> On Tue, 2004-09-07 at 19:27, Elijah Meeks wrote:
> > Does anyone plan to extend the side options, maybe put
> > in some crude diplomatic functions?
> 
> I think that some code exists for diplomatic functions, but either it
> was never fully implemented or it never worked in the first place.

The agreements code is currently commented out for some reason or 
another. Hopefully, this will be reenabled or reimplemented at 
some point down the road. I'm not going to volunteer to do it, 
because of so many other Xconq-related commitments that I have 
made.

Eric

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-09-08 18:02 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-08  1:51 Problem compiling new version of ai_plan_research Lincoln Peters
2004-09-08  3:39 ` Eric McDonald
2004-09-08  5:20   ` Lincoln Peters
2004-09-08  3:49     ` Eric McDonald
2004-09-08  3:53       ` Lincoln Peters
2004-09-08  3:54         ` Research of Advances and SDL UI Improvements Eric McDonald
2004-09-08  3:47 ` Politics Elijah Meeks
2004-09-08  8:27   ` Politics Lincoln Peters
2004-09-08 19:30     ` Politics Eric McDonald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).