# Reversi -- new game on apps.tv



## wmcbrine (Aug 2, 2003)

I've just got a new game listed on apps.tv. It's my own take on Reversi. Believe it or not, I was always planning this as my first game, but then PlayTeeVee came up with theirs, so I put it aside. Now theirs is gone, so, here's mine.

It automatically takes advantage of high-definition mode, if available, which I believe makes it technically the first HD game for the TiVo. But don't get too excited -- the graphics are very simple. It's more about keeping circles circular, and squares square.

You can play against the computer, or against another TiVo user. The computer is a slightly better player than in PlayTeeVee's version (though more erratic), but the algorithm was chosen mainly for its low CPU usage.

Right now, this is running on my home machine. If anyone would like to donate better hosting, let me know. (It just needs Python, and an open port.)

Acknowledgments: The routine that determines the set of legal moves was adapted from Brent Burley's Reversi.py, and the computer's strategy from Mark Williams' "Positional" strategy for the same program. Some ideas were drawn from PlayTeeVee's version, as well as from Iagno, and from the Wikipedia article on Reversi.

Edit: apps.tv is dead, but Reversi lives on. Enter 71.18.73.156 under "Add an App" on your TiVo to use it.


----------



## raianoat (Jan 27, 2004)

Thanks for creating this. I'll post something on my blog later today....


----------



## wmcbrine (Aug 2, 2003)

Improved performance on Series 2 -- now it works the way it's supposed to.


----------



## wmcbrine (Aug 2, 2003)

Fixed a couple of stupid bugs that I'd added recently -- the app would crash when going from board to menu to board again, or when entering the dual player waiting screen before the animation on the splash screen was done.


----------



## wmcbrine (Aug 2, 2003)

And another even dumber bug -- the "Change name" function was broken. Sorry about that.


----------



## wmcbrine (Aug 2, 2003)

About dual-player mode: I've often been online when someone else was, but only twice has the other player come to play against me. I'd really like to encourage people: if you see someone else come on, and you're playing against the computer, quit your game and go play the human. They're much more interesting opponents. 

One thing I noticed in both cases was that my opponents initially seemed confused by playing white, since in the single-player games the human player is always black. So, I've changed the dual-player mode so that the first one to enter (the one who gets the "Waiting for opponent" screen) is white, and the second player to enter (the one who accepts the invitation, as it were) is black. This also lets the second player make the first move, while waiting for the first player to notice that the game is on.

Note that, according to studies of the game, there's no advantage to playing black or white -- perfect play ends in a draw -- although their optimal strategies are different.


----------



## wmcbrine (Aug 2, 2003)

Outage yesterday due to a) cats, and b) my router's auto-update of dyndns not working -- hopefully fixed.


----------



## lelele (Apr 26, 2007)

Does this use python HME?


----------



## wmcbrine (Aug 2, 2003)

I just told you in the HME for Python thread that it does.


----------



## wmcbrine (Aug 2, 2003)

I've added a couple of new game modes. One is two-player local, where your remote just alternates between controlling black and white. (If you have two remotes, one for each player, so much the better.) The other is the opposite: "demo" mode, where the computer controls both players.

I haven't yet decided how or whether to include these in the menu, so for now they're only accessible via the number keys: '0' for two-player local, and '3' for the demo mode. (BTW, I never announced it, but '1' (for "vs. Computer", formerly known as "single-player" mode) and '2' (for "vs. Human", formerly "dual-player") have been available as menu shortcuts since the beginning.)


----------



## wmcbrine (Aug 2, 2003)

...and win... well, maybe a game of Reversi. No, no prizes, but it's hovering at 499 right now, and you could be the one to tip it over! 

Act now, while apps.tv still exists...


----------



## wmcbrine (Aug 2, 2003)

Reversi will be down until I can get a replacement UPS, hopefully this evening.


----------



## wmcbrine (Aug 2, 2003)

OK, Reversi is back online now.


----------



## wmcbrine (Aug 2, 2003)

I've just added support for direct text entry in the user name changer (via "Slide" remote, other USB keyboard, or (currently on Premiere only) the 0-column mode of my network remote).

Also, Reversi is now getting pretty close to its 1000th subscriber.


----------



## wmcbrine (Aug 2, 2003)

Some of you may have noticed a lot of Reversi outages lately. This is because the computer it's running on is connected to a flaky old router that keeps dying for no reason, until the router is rebooted. I'd have fixed this before now, except that I'm moving on Friday. That will mean an extended outage, but I'll try to have it back up by the end of the day.


----------



## PaJo (Dec 17, 2001)

I was blaming my Tivo...


----------



## wmcbrine (Aug 2, 2003)

The move is done, and Reversi should be back up now, although I can't test it. Sorry for the delay -- I was tired, etc. Also, the bad router is out of the loop now.


----------



## wmcbrine (Aug 2, 2003)

Updated with my new understanding of direct keyboard input -- if you have a Slide or other USB keyboard, or are using the KEYBOARD command via the network interface, you now can (and must!) use the remote's ability to enter mixed case directly, along with symbols, without having to change the board. However, when using the IRCODE command via the network interface (as in the current version of my remote program), you still need to change the board to change case.


----------



## wmcbrine (Aug 2, 2003)

So, apparently, two-player mode ("Play Human") has been essentially broken since I added output buffering to HME for Python -- in March of 2009.  And I just realized this tonight, after finally managing to play a two-player game despite the problem. I was pressing the keys in frustration while waiting for my opponent to move, and saw that the screen only updated when I did so. He must've seen the same thing. Before that, I'd had a few two-player games that started, but never went anywhere, so I just quit them, mistakenly blaming the other player for not moving. 

I imagine I would've noticed this sooner if I'd been able to get more two-player games going in the first place. It's been a once-every-few-months kind of thing. Then again, maybe people were avoiding "Play Human" because they knew it was broken? But no one told me.

Anyway, it's fixed now. I hope more people will try it.


----------



## PaJo (Dec 17, 2001)

Nice work. I think your version of Reversi is the only thing that really is a Tivo exclusive. 

joe


----------



## wmcbrine (Aug 2, 2003)

Apps.TV is no more. Consequently, Reversi is unavailable for now. I'm still thinking about what to do about this. In the meantime, I guess I should power down the Mac Mini that's been hosting it for the last few years.


----------



## wmcbrine (Aug 2, 2003)

Reversi lives!  If you want to use it, just add this IP to your TiVo's menu:

71.18.73.156

I may provide other apps in the future, but for now, there's only Reversi (and there's no selection mechanism, as there was with apps.tv). I've pre-paid for this for two years, and I control it, so expect it to stick around for a while.


----------



## jhilla (May 13, 2011)

Thanks for the IP, adding game to my list of toys on tivo.


----------



## rdrrepair (Nov 24, 2006)

wmcbrine said:


> Reversi lives!  If you want to use it, just add this IP to your TiVo's menu:
> 
> 71.18.73.156


Loaded this as an app last night and played it for the first time. Thanks for posting this.

In regards to the "Human Play" mode. When you see that there is a human on, does that mean he's waiting for someone to play against and you're required to make the first move?

I sat there for a few seconds waiting for a prompt of some sort and I just left to play against the machine.

Also, where do I go to find other apps or widgets to load onto my TiVo?


----------



## wmcbrine (Aug 2, 2003)

rdrrepair said:


> In regards to the "Human Play" mode. When you see that there is a human on, does that mean he's waiting for someone to play against and you're required to make the first move?


No, it's just a count of total users online (including you). But if you actually enter the "Play Human" item and get a game board, then yes, there's another person with you, and it may or may not be your turn. You should be able to figure it out from what's onscreen... if you _can_ make a move, then it's your turn.

If you just see "Waiting for opponent...", it means there's an odd number of people (usually one) who've chosen "Play Human", and the program is waiting for someone else to choose it so you can be paired up.



> _Also, where do I go to find other apps or widgets to load onto my TiVo? _


Since apps.tv went down, at the moment, I think this is the only third-party hosted app on offer.

However, if you don't mind hosting them on your own PC, there are a few listed here:

http://hmedev.wikidot.com/list-of-known-applications


----------



## wmcbrine (Aug 2, 2003)

I have a proper TiVo project web page with instructions for Reversi now, at http://wmcbrine.com/ (specifically, http://wmcbrine.com/tivo/#reversi ), if anyone cares to link to it instead of to this thread.


----------



## wmcbrine (Aug 2, 2003)

So, the latest news is that version 20.3.1 of the TiVo software (for Premieres) kind of breaks Reversi. See here:

[media]http://www.youtube.com/watch?v=mwyclyKRHn8[/media]

I'll try to work around this.


----------



## wmcbrine (Aug 2, 2003)

OK, I've removed all the fade effects from Reversi, for now, so it will work the same on all TiVos.


----------



## wmcbrine (Aug 2, 2003)

Recent downtime was due to dyndns not updating.


----------



## wmcbrine (Aug 2, 2003)

New feature: The selector is displayed as solid only when on a square that constitutes a valid move for the active player; otherwise it appears as dashed. (Previously it was always solid.) This gives you an indicator of valid and invalid moves without having to actually click select and hear the bonk.


----------



## jhilla (May 13, 2011)

Will you be offering the option to play against another player in the same home.. Currently 2 player mode is against another virtual player.


----------



## wmcbrine (Aug 2, 2003)

jhilla said:


> Will you be offering the option to play against another player in the same home.. Currently 2 player mode is against another virtual player.


I'm not sure what you're asking for, or what you mean by "virtual player". Human vs. human mode is really TiVo vs. TiVo -- these can as easily be in the same home as not. Or, if you want to have two people playing in front of the same TiVo, just press "0", as described above.


----------



## jhilla (May 13, 2011)

Honestly I never thought to hit "O", will try that out later. Cool. Thanks.


----------



## wmcbrine (Aug 2, 2003)

0, not O


----------



## wmcbrine (Aug 2, 2003)

Outage yesterday due to problems with my LAN.


----------



## wmcbrine (Aug 2, 2003)

I finally moved Reversi to a "cloud" server, today. Users shouldn't notice much difference -- it may be a little jerkier at times. But it does mean that I'm no longer violating Fios' TOS.


----------



## wmcbrine (Aug 2, 2003)

Outage the last few days due to unexpected shutdown of remote server, and me not checking. Fixed now.


----------



## wmcbrine (Aug 2, 2003)

Outage the last few days due to weirdness at the remote server. Guess I need to stay on top of this more.


----------



## wmcbrine (Aug 2, 2003)

So, apparently Reversi has been down since August 14th, but I just noticed today. Sorry about that. Guys, please let me know when it's not working for you.

I'm not sure what happened -- the virtual host machine just shut down for some reason that wasn't logged. Anyway, it's up now.


----------



## wmcbrine (Aug 2, 2003)

Down since ~Oct 1st due to the server mysteriously remounting its filesystem read-only, I dunno why. Just noticed this morning.

Yeah, I'm getting pretty fed up with this host.


----------



## wmcbrine (Aug 2, 2003)

Back up after about a week's outage, sorry. Clearly I need to check this more often, like every day. I'll try to do that going forward.


----------



## wmcbrine (Aug 2, 2003)

The extensive outage recently was due to the VPS host, CloudAtCost. I'm done with them. I've just opened an account with a new host, VirMach.com. So far, it seems better than [email protected] ever was -- maybe a little slower, but more consistent.

The pointer is already switched over, and users shouldn't have to do anything special to make it work. Some of you may lose your usernames, because I'm not able to get the current list off of [email protected]; but you can reenter them, and there's no impact except for what name is displayed, which only matters in dual-player mode, which nobody seems to use anyway.


----------



## wmcbrine (Aug 2, 2003)

So, this looks like the end of the line for HME apps, including Reversi. Shame, since I finally got a stable host for it. Anyway, for those who are still able to use it (older model TiVos that don't get updated), I'll leave it running for at least the next year. But it'll be even more on autopilot than usual, since I won't be able to play it myself.


----------



## wmcbrine (Aug 2, 2003)

My web host just got bought out, and the new owners are going to change my IP. Up until now, Reversi has (after going missing for a while) continued to work on systems where it was already added; but IIRC, on newer software, it's no longer possible to put in a new IP, so those boxes will lose it. It may still work on really old TiVos, or, you may be able to access it through David Blackledge's app, if you've put that in.

I'm not sure when the change will come into effect; I'll post when I know.

(Note that this is all about the host for wmcbrine.com, not the VPS hosts I talk about above. The only part of Reversi that's on wmcbrine.com is a silly little index file and an icon, but that's where the IP points.

The whole history of HME might've been different if TiVo had allowed domain names instead of IPs...)


----------



## reneg (Jun 19, 2002)

I could add it on a Roamio Pro, but not a Bolt


----------



## wmcbrine (Aug 2, 2003)

So, the day of the transfer has come, and... Reversi's still working, because the old server is still running at the old IP, even though wmcbrine.com has been moved. But they surely won't maintain it indefinitely, and it could go away at any moment now.

Once that happens, I'll have a dilemma (assuming that "Add an App" even keeps working). Currently, Reversi traffic is divided into two parts: the app list/logo, and the actual game. This is because the app list and logo are requested every time a subscribed user hits the "Apps" menu on their TiVo, while the game only runs when selected. So the vast, vast majority of traffic is the stupid list and logo being served out over and over again. I put them on a server where I couldn't actually run the game itself, but where I had unlimited data. I can no longer do that with the new host for wmcbrine.com, since it no longer has a dedicated IP (and add-an-app only works by IP).

The simplest thing would be to transfer them to the VPS, where the game actually runs, which still has a dedicated IP. But _there_, I don't have unlimited data. Maybe that wouldn't turn out to be an issue, but I haven't really kept track of how much data it was using, since I didn't need to.


----------



## Mike Richardson (Sep 24, 2012)

removed


----------



## wmcbrine (Aug 2, 2003)

It's 807 bytes -- a 26x26 pixel PNG. I don't think it's getting much smaller. 

BTW, the data limits on the VPS turn out to be pretty generous, so that's probably where it's going. But they still haven't shut down the old server yet...


----------



## rdrrepair (Nov 24, 2006)

I just tried loading it on my Roamio Pro. Error (msg_v310_id)

It was working on my premiere the other day.


----------

