bca1b3f913da499d8d2f366848f7584b03e768b9,gym/envs/toy_text/taxi.py,TaxiEnv,_render,#TaxiEnv#Any#Any#,111

Before Change



        di, dj = self.locs[destidx]
        out[1+di][2*dj+1] = utils.colorize(out[1+di][2*dj+1], "magenta")
        outfile.write("\n".join(["".join(row) for row in out])+"\n")
        if self.lastaction is not None:
            outfile.write("  ({})\n".format(["North", "South", "East", "West", "Pickup", "Dropoff"][self.lastaction]))
        else: outfile.write("\n")

After Change


        outfile = StringIO() if mode == "ansi" else sys.stdout

        out = self.desc.copy().tolist()
        out = [[c.decode("utf-8") for c in line] for line in out]
        taxirow, taxicol, passidx, destidx = self.decode(self.s)
        def ul(x): return "_" if x == " " else x
        if passidx < 4:
            out[1+taxirow][2*taxicol+1] = utils.colorize(out[1+taxirow][2*taxicol+1], "yellow", highlight=True)
            pi, pj = self.locs[passidx]
            out[1+pi][2*pj+1] = utils.colorize(out[1+pi][2*pj+1], "blue", bold=True)
        else: // passenger in taxi
            out[1+taxirow][2*taxicol+1] = utils.colorize(ul(out[1+taxirow][2*taxicol+1]), "green", highlight=True)

        di, dj = self.locs[destidx]
        out[1+di][2*dj+1] = utils.colorize(out[1+di][2*dj+1], "magenta")
        outfile.write("\n".join(["".join(row) for row in out])+"\n")
        if self.lastaction is not None:
            outfile.write("  ({})\n".format(["North", "South", "East", "West", "Pickup", "Dropoff"][self.lastaction]))
        else: outfile.write("\n")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: openai/gym
Commit Name: bca1b3f913da499d8d2f366848f7584b03e768b9
Time: 2016-04-28
Author: mail@jonasschneider.com
File Name: gym/envs/toy_text/taxi.py
Class Name: TaxiEnv
Method Name: _render


Project Name: IndicoDataSolutions/finetune
Commit Name: 29f42297a50a71acbdc469c4badd440d2ddfbf3a
Time: 2018-09-06
Author: madison@indico.io
File Name: finetune/config.py
Class Name:
Method Name: all_gpus


Project Name: cesium-ml/cesium
Commit Name: 7e5457613291014593a879d6b44702b8999ea9e5
Time: 2016-05-05
Author: stefanv@berkeley.edu
File Name: tools/check_sdist.py
Class Name:
Method Name: