This is the announcement for the first version of Fico.
Fico is a ruby program playing the board game Havannah[1].
The aim is to write a fairly strong AI for the game. At the moment the
only features are that the program can play according to the rules and
that a random player exists.
How to get it
- -------------
You can either download the tarball of the latest version from
http://www.cip.ifi.lmu.de/~hafner/projects/fico or you can get the
latest development version from the darcs[2] repository at
http://www.cip.ifi.lmu.de/~hafner/darcs/fico .
Further information
- -------------------
For information on how to play it look at the README.rdoc file
distributed with the program or read the full announcement at
http://bettong.net/articles/2005/04/10/fico-version-0-1-0 .
Urban
[1] http://en.wikipedia.org/wiki/Havannah
[2] http://darcs.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCWTjwggNuVCIrEyURAkMvAJ91D2jw8qPemHRzvPx4E9cTXheNdQCeNSnQ
QzPRw1roLtIgE2F0lZ1KN/4=
=1UOZ
-----END PGP SIGNATURE-----
Check this out:
http://www.mindsports.net/index-mindsports.html
"Havannah is a pencil and paper game the rules of which can be
understood by any eight year old in a minute or so. The inventor has,
in the summer 2002 issue of Abstract Games, put € 1000.- prize money
on a program that can beat him one out of ten games within the next
decade"
Cheers,
Ed
--
Encontrá a "Tu psicópata favorito" http://tuxmaniac.blogspot.com
Edgardo Hames wrote:
| Check this out:
|
| http://www.mindsports.net/index-mindsports.html
|
| "Havannah is a pencil and paper game the rules of which can be
| understood by any eight year old in a minute or so. The inventor has,
| in the summer 2002 issue of Abstract Games, put € 1000.- prize money
| on a program that can beat him one out of ten games within the next
| decade"
Yes, I've read that. But I'm not sure I'll ever get that far ... But who
knows :)
Urban
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCWVRmggNuVCIrEyURArjzAJ4nlUWvtNAGRvZzu/ucHRc03Jfs1QCeNDxu
KlUlmcPB5xlzoSHPpl+odpo=
=xjP3
-----END PGP SIGNATURE-----
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> This is the announcement for the first version of Fico.
>
> Fico is a ruby program playing the board game Havannah[1].
>
> The aim is to write a fairly strong AI for the game. At the moment the
> only features are that the program can play according to the rules and
> that a random player exists.
Writing an AI for that game would be a wonderful Quiz topic. You'd just
need to implement an API for doing a turn and the game. However, for
this one it might actually be a good idea to disallow cheating by
changing your opponent or by using its internal state.
I was not familiar with Havannah, until I saw these posts, but I'm all
for the idea. If either of you wish to write it up and send it in we
can do it.
James Edward Gray II
Uh, from what I can see, Havannah is definitely a non-trivial game, on
the same level as Go or Chess. You'll need a lot more than 48 hours to
code up a decent player that doesn't run forever before spitting out a move.
--
Glenn Parker | glenn.parker-AT-comcast.net | <http://www.tetrafoil.com/>
First I thought, lets just take XML; then I thought that it would be
rather slow if I had to pass past data of - lets say a CD Image of a
downloadable file I stored in there - so i concluded to separate
structure from content/data again - but this makes it inflexible,
cause I just cant set a flag "fulltext-search-disabled: no" to
include, lets say, a really huge text document for example.
Anyone got an idea? I am still planning my project, I also looked
around for a flexible pure OO language fitting web developers needs,
and found ruby =).
So, anyone knows a free native XML/OO Database? I am kind of new to
XML structures as well, but I imagen something that works like this:
- can import .xml files
- can use a .dtd file to test the data structure of a .xml file but
must not!
- can export .xml files
- data inside the xml database is accessible (selectable) via anything
like xPath ( http://www.w3.org/TR/xpath ) /
xPointer ( http://www.w3.org/TR/xptr-xpointer/#b2b1b1a ) or so... I
am not yet deep into this topic.
Maybe I don't need XML, and there is another way to store the type of
data I got. (tree-like, file-system comparable).
It should work well with ruby somehow (maybe there could be any kind
of interface/module I can use).
(something was missing)
..
> but this makes it inflexible, cause
> I just cant set a flag "fulltext-search-disabled: no" to include, lets
> say, a really huge text document for example.
.. into full text search onto the complete data structure.
also I have to separate which data to take out of the xml tree and
which to keep in.
(sorry for my bad english skills, ah and its late nite =)
This suggestion is kind of out of left field: did you consider Kowari
(kowari.org), it's an RDF database and you can access it via SOAP which
means a Ruby interface is not too far away. Nice thing about Kowari is
that it integrates Lucene and has a very powerful query/inference
language called iTQL.
I found a confusion mapping OO to XML, are the element names roles or
types? That problem dissapears with RDF because you specify both roles
and types, e.g. the confusion in XML:
<circle> <center x=0.4 y=0.5> </circle>
<document> <paragraph> </paragraph> </document>
There seems to be a confusion between roles and types. Circle is a type
right? and center is a role?
regards,
Richard.
You don't want an XML or OO database. There have been numerous
discussions on the inappropriateness of OO databases for most
applications, and XML databases are even worse.
It is better, in the case of filesystem-like database situations, to
keep your file contents separately from your hierarchy. In that way,
you can even deal with the possibility of duplicate file contents.
-austin
--
Austin Ziegler * halos...@gmail.com
* Alternate: aus...@halostatue.ca
but we have to make AI vs AI matches so I don't think we would mind that
much about dumb movies :)
(I also think Go is harder than Chess but maybe it's just that I'm so
poor at it)
James Edward Gray II wrote:
|> Writing an AI for that game would be a wonderful Quiz topic. You'd
|> just need to implement an API for doing a turn and the game. However,
|> for this one it might actually be a good idea to disallow cheating by
|> changing your opponent or by using its internal state.
|
|
| I was not familiar with Havannah, until I saw these posts, but I'm all
| for the idea. If either of you wish to write it up and send it in we
| can do it.
Well, university started again today so I might not have that much time
the next days to write it up. Apart from that my English is not that
good, so it would take me quite a while.
Oh yes, and now that I think of it: There is no code to run a tournament
between different AIs. This would be a nice feature (which I plan to do
for the next release) but it's not there yet.
But if anyone wants to do the writing I'll try to answer all questions
that may arise.
Urban
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCWmFtggNuVCIrEyURAiX3AKC2t71i5jkp1xXkfLma/MknD1s7DgCfZuVN
h4FT0RyWIeoeYJABJfwJgs0=
=oZxz
-----END PGP SIGNATURE-----
first of all, thanks for you answer!
> This suggestion is kind of out of left field: did you consider Kowari
> (kowari.org), it's an RDF database and you can access it via SOAP
it needs a java enabled server.
my aim is to build software that is EASY TO USE, but it should as well
be EASY TO INSTALL. it is almost a problem for many users out there to
just install ruby or php - while php is installed at many webhosts, it
is not the right tool for my tasks, even though I am a lot more
familiar with it =). By using ruby I ll force many average users into
trouble, from a practical point of few, and by using a java server I'd
extend that much more.
so this is no option to me anyway :<.
> I found a confusion mapping OO to XML, are the element names roles or
> types? That problem dissapears with RDF because you specify both roles
> and types, e.g. the confusion in XML:
>
> <circle> <center x=0.4 y=0.5> </circle>
> <document> <paragraph> </paragraph> </document>
>
> There seems to be a confusion between roles and types. Circle is a type
> right? and center is a role?
I am not familiar with "roles and types" in this regard - so I dont
know what you are talking about, but by your example I thought, do you
mean the distinction between datatypes/datacontainers and
data/dataelements?
I suspect so. It is a common problem, using subordinate XML elements to
describe their parent, while at the same time using subordinate
elements to describe a parent/child relationship:
<!-- Poor XML Design (IMO) -->
<Person>
<Name>Don</Name>
<Age>75</Age>
<Person>
<Name>Don's Son</Name
<Age>32</Age>
</Person>
</Person>
<!-- Better XML Design -->
<Person name="Don" age="75">
<Person name="Don's Son" age="32 />
</Person>
So the general rule of thumb arises: "Use attributes to describe an
object, and parent/child nodes to describe relationships between
objects."
This guideline falls down, though, when you need to describe a complex
attribute on the node. Often, the simple CDATA string format of an
attribute is insufficient to describe an attribute well, so you end up
with something like:
<FavoriteColor red="255" green="0" blue="102" alpha="152" />
or
<FavoriteColor rgba="255 0 102 152" />
The former is 'bad' because it is so verbose; the latter is 'bad'
because it requires an external processor (or smart xslt agent) to do
meaningful processing on the individual values. Further, the latter
requires the processing agent to know the order of the values in the
space-delimited string.
You can't even use the former solution in cases where an arbitrary
number of points may exist, such as:
<Model vertex_locations="(10 20 30) (15 88 -12) (-17 89 10) (...) ..."
/>
This is certainly preferable (IMO) to something like:
<Model>
<VertexLocations>
<Point x="10" y="20" z="30" />
<Point x="15" y="88" z="-12" />
<Point x="-17" y="89" z="10" />
...
</VertexLocations>
</Model>
both in terms of verbosity as well as node encapsulation, but neither
solution is good.
(Though these examples are contrived, the problem is not. For example,
look at the information crammed into the 'd' attribute for an SVG Path
element: http://www.xml.com/pub/a/2000/03/15/deviant/ )
We now return you to your regularly-scheduled Ruby discussion.
--
"When I am working on a problem I never think about beauty. I only
think about how to solve the problem. But when I have finished, if the
solution is not beautiful, I know it is wrong."
- R. Buckminster Fuller
> James Edward Gray II wrote:
>> I was not familiar with Havannah, until I saw these posts, but I'm
>> all for the idea. If either of you wish to write it up and send it
>> in we can do it.
>
> Uh, from what I can see, Havannah is definitely a non-trivial game, on
> the same level as Go or Chess. You'll need a lot more than 48 hours
> to code up a decent player that doesn't run forever before spitting
> out a move.
I think a minimax search, on a board that size is definitely not going
anywhere fast (especially in Ruby). It does strike me that a game like
that has certain patterns though, which a clever programmer might be
able to exploit.
I agree that we definitely wouldn't be creating tournament champions,
but I'm guessing we could do a touch better than a random player.
Or, we could try building an AI for a simpler game, since I believe
that was the point of the suggested exercise.
James Edward Gray II
>> I was not familiar with Havannah, until I saw these posts, but I'm all
>> for the idea. If either of you wish to write it up and send it in we
>> can do it.
>
> Uh, from what I can see, Havannah is definitely a non-trivial game, on
> the same level as Go or Chess. You'll need a lot more than 48 hours to
> code up a decent player that doesn't run forever before spitting out a
> move.
True, but this would be an AI vs. AI challenge meaning that every small
advantage you have will do lots to your results.
The reason why I think this game would be so well-suited because it is
reasonably simple at core -- the dumbest player would just randomly put
pieces onto unpopulated fields. Compare that to chess where there is
relatively complex rules that all AIs have to know in order to play at
all. Sure, it is way deeper than the Rock, Paper, Scissors challenge we
did earlier, but I think that that would make it more interesting.
I think the goal would be having a simple strategy that works out well
instead of implementing another Deepblue.
> The reason why I think this game would be so well-suited because it is
> reasonably simple at core -- the dumbest player would just randomly
> put pieces onto unpopulated fields. Compare that to chess where there
> is relatively complex rules that all AIs have to know in order to play
> at all. Sure, it is way deeper than the Rock, Paper, Scissors
> challenge we did earlier, but I think that that would make it more
> interesting.
I have been toying with the idea of a Lost Cities tournament quiz, for
similar reasons. If you're not familiar with the name, it's a simple
but super fun card game. The rules are very basic and we could just
focus on making a good AI player.
Sounds like at least some of us are interested in this kind of thing...
James Edward Gray II
> Glenn Parker ha scritto:
> (I also think Go is harder than Chess but maybe it's just that I'm so
> poor at it)
Seen from the point of the rules, it's a lot easier.
Seen from the number of possible moves, it's a lot harder.
--
Christian Neukirchen <chneuk...@gmail.com> http://chneukirchen.org
yup, it seem the same to me.. yet another case of simple core allowing
for great development :)
Urban Hafner wrote:
| Oh yes, and now that I think of it: There is no code to run a tournament
| between different AIs. This would be a nice feature (which I plan to do
| for the next release) but it's not there yet.
I just released 0.1.1 which is mainly a fix for that. It now included a
script to run tournaments.
Urban
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCWtD4ggNuVCIrEyURAn7bAJ9HD87xry2t3TM3MYr6q5gadDL86wCfW3Rw
ZRk4nAmEe+2USYT5UJocXF8=
=7Lzm
-----END PGP SIGNATURE-----
Then why not use the filesystem ?
> Maybe I don't need XML, and there is another way to store the type of
> data I got. (tree-like, file-system comparable).
Why not use the filesystem ?
Sorry to respond so late: If you do use the file system, you can make it
look more like a database from ruby by using fsdb (find it on RAA).
-filesystem like tree structures
-unlimited dynamic previleges
-single step (diff - cvs style) versioning over the whole system
I ll take a look at FSDB!
I thought I could use "diff" on XML nodes somehow... to add versioning.