public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Hexiom Solver Error: Anchor Not Found
@ 2018-04-04 10:48 SY Tang
  2018-04-04 16:20 ` David Stacey
  2018-04-04 20:45 ` Daniel Hartmeier
  0 siblings, 2 replies; 3+ messages in thread
From: SY Tang @ 2018-04-04 10:48 UTC (permalink / raw)
  To: cygwin, daniel

Hello,

I recently downloaded your Hexiom solver from your webpage out of interest
(and desperation after failing hundreds of times at the 6x6 size puzzle...
:().

However, try as I might, I am unable to get it to work, I first got an
error which says: *"WARNING: Couldn't compute FAST_CWD pointer"*, which I
believe i self-fixed by running in Windows XP compatibility mode. After
which, I still get another error which says *"Anchor not found"* and then a
layout of 0s appear.

I assume that the "anchor" is the hexiom board which the program is
supposed detect, but I do not understand how it cannot detect the board: I
resized my chrome browser window so that the hexiom board takes the entire
left half of the screen, with the cmd prompt on the right half, yet the
program still shows the error. I watched the demonstration video and I
can't find what I'm doing wrong. Can you please assist?

For your info, I am running Windows 10, Chrome Browser for the Hexiom game.

Thank you!
SY Tang

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Hexiom Solver Error: Anchor Not Found
  2018-04-04 10:48 Hexiom Solver Error: Anchor Not Found SY Tang
@ 2018-04-04 16:20 ` David Stacey
  2018-04-04 20:45 ` Daniel Hartmeier
  1 sibling, 0 replies; 3+ messages in thread
From: David Stacey @ 2018-04-04 16:20 UTC (permalink / raw)
  To: cygwin; +Cc: swenyitang99, daniel

On 04/04/18 11:48, SY Tang wrote:
> I recently downloaded your Hexiom solver from your webpage out of interest
> (and desperation after failing hundreds of times at the 6x6 size puzzle...
> :().
>
> However, try as I might, I am unable to get it to work, I first got an
> error which says: *"WARNING: Couldn't compute FAST_CWD pointer"*,

It looks as though the Hexiom solver that you're using has Cygwin under 
the bonnet. The version of Cygwin used is probably quite old and needs 
updating to work with modern versions of Windows.

See: https://cygwin.com/faq.html#faq.using.fixing-find_fast_cwd-warnings

I'm afraid that we can't support that here. You need to contact the 
supplier of the Hexiom solver and ask them to rebuild using a newer 
version of Cygwin. Failing that, you could compile your own version 
using the instructions at the top of this file: 
https://www.benzedrine.ch/hexiom/hexiom.c

Dave.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

* Re: Hexiom Solver Error: Anchor Not Found
  2018-04-04 10:48 Hexiom Solver Error: Anchor Not Found SY Tang
  2018-04-04 16:20 ` David Stacey
@ 2018-04-04 20:45 ` Daniel Hartmeier
  1 sibling, 0 replies; 3+ messages in thread
From: Daniel Hartmeier @ 2018-04-04 20:45 UTC (permalink / raw)
  To: SY Tang; +Cc: cygwin

On Wed, Apr 04, 2018 at 06:48:07PM +0800, SY Tang wrote:

> However, try as I might, I am unable to get it to work, I first got an
> error which says: *"WARNING: Couldn't compute FAST_CWD pointer"*, which I
> believe i self-fixed by running in Windows XP compatibility mode. After
> which, I still get another error which says *"Anchor not found"* and then a
> layout of 0s appear.
> 
> I assume that the "anchor" is the hexiom board which the program is
> supposed detect, but I do not understand how it cannot detect the board: I
> resized my chrome browser window so that the hexiom board takes the entire
> left half of the screen, with the cmd prompt on the right half, yet the
> program still shows the error. I watched the demonstration video and I
> can't find what I'm doing wrong. Can you please assist?
> 
> For your info, I am running Windows 10, Chrome Browser for the Hexiom game.

The program is taking a screenshot and searching the bitmap for the
upper left corner of the hexagon board, see function scan() in scrape.c

        for (py = 0; py < h - 1; ++py) {
                for (px = 0; px < w - 1; ++px) {
                        if (diff(R(px,     py), 0x25020C) < 4 &&
                            diff(R(px + 1, py), 0x25020C) < 4 &&
                            diff(R(px, py + 1), 0x25020C) < 4 &&
                            diff(R(px + 1, py + 1), 0x7F7F7F) < 4) {
                                fx = px;
                                fy = py;
                        }
                }
        }
        if (fx < 0 || fy < 0) {
                printf("anchor not found!\n");
                free(p);
                return;
        }

It looks for a two-by-two pixel square where the bottom-right pixel has
RGB color 127,127,127 (grey) and the other three pixels have RGB color
37,2,12 (redish almost black).

You could try to take a screenshot, write it into a bitmap file, open
that with MSPaint and check the RGB colors of the pixels at the upper
left corner of the hexagon.

This still works for me on Mac with Safari, if I find time I can give it
another try on a more recent Windows with an up-to-date cygwin.

I guess you could also just move the browser window so the corner is at
a known position, and edit scrape.c to simply set fx and fy to those
coordinates and rebuild a binary.

HTH,
Daniel

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

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

end of thread, other threads:[~2018-04-04 20:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-04 10:48 Hexiom Solver Error: Anchor Not Found SY Tang
2018-04-04 16:20 ` David Stacey
2018-04-04 20:45 ` Daniel Hartmeier

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).