Bug 168013 - create python AI interface
Summary: create python AI interface
Status: RESOLVED LATER
Alias: None
Product: kmines
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: VLO wishlist
Target Milestone: ---
Assignee: Dmitry Suzdalev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-01 17:44 UTC by Ethan Anderson
Modified: 2008-08-04 20:48 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ethan Anderson 2008-08-01 17:44:46 UTC
Version:            (using KDE 4.1.0)
Installed from:    Ubuntu Packages

I would like kmines to have an AI used for determining when free hints can be provided and running demonstration games.
..and I'd like to code said AI in python, but I suppose a good AI interface would be able to be used with compiled code just as well..

It needs to be able to play just like a player, plus direct board queries (for free hints), plus a console to print things to show the person watching the demo..  I may even want to make an AI for different playing styles, such as doing one kind of move everywhere possible, then the next kind, then back again, repeat, and another one based on location to be easier to follow, with and without the reveal-all-unflagged-adjacent game signal, with different speeds and all that too.

The thing is, that interface needs to be created in C++, so at this point I can't do much.
I intend to make the code scalable to multiple mines per space from the get-go but I don't know if I'm up for an alternate geometry AI quite yet-- we'll see.
Comment 1 Dmitry Suzdalev 2008-08-04 11:37:30 UTC
Mauricio, do you have any comments on this?
Comment 2 Mauricio Piacentini 2008-08-04 14:07:29 UTC
Well, we had a solver in KDE 3, so I guess that if someone wants to implement it that code could be a good starting point. But frankly I am not planning to add it, as I think the game works OK as it is and is simpler to maintain. The exception is maybe for demo purposes, but even in this case we could simply write some very simple C++ code that chooses a starting point and keeps revealing adjacent mines (that it knows are good) until a given threshold is hit, and then it errors out.
Introducing a python dependancy for this is a mistake imo, but each one has its own itch to scratch, so I would not discard any contribution along these lines.

Regards,
Comment 3 Dmitry Suzdalev 2008-08-04 14:10:06 UTC
Agreed. Another option I had in mind regarding this: instead of creating python interface, it could be simpler to export some DBus interface, which in turn can be easily scripted using python-dbus bindings...
Comment 4 Ethan Anderson 2008-08-04 20:48:28 UTC
DBUS?  That sounds swell.  I'd go for that.  I get what you're saying,
but gnome chess has a 3d feature that requires python OpenGL bindings
to be installed-- and it isn't a dependency of gnome chess.  Chess
works fine without it, and if it's not installed, you just don't get
the 3d is all.

Perhaps a similar approach would work?

On 4 Aug 2008 12:10:07 -0000, Dmitry Suzdalev <dimsuz@gmail.com> wrote:
[bugs.kde.org quoted mail]